Like ":cscope" but uses location list
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2main();Cursor on line 1, column 1main();Cursor on line 1, column 1int main(void) { return 0; }Cursor on line 1, column 1Like ":cscope" but uses location list.
Prepared cscope connection
- Database
/example/cscope.out (connected)- Query g main
main.c:1: int main(void) { return 0; }
Command entered · ready to apply
Prepared cscope connection
- Database
/example/cscope.out (connected)- Query g main
main.c:1: int main(void) { return 0; }
Command line
- Typed text
:lcscope find g main- Insertion offset
20
:lcscope populates the current window's location list and jumps to its single definition.
Prepared cscope connection
- Database
/example/cscope.out (connected)- Query g main
main.c:1: int main(void) { return 0; }
Windows
- main.c Active
int main(void) { return 0; }
Current-window location list
- 1
main.c:1: int main(void) { return 0; }
Before & after
main();Cursor on line 1, column 1Prepared cscope connection
- Database
/example/cscope.out (connected)- Query g main
main.c:1: int main(void) { return 0; }
int main(void) { return 0; }Cursor on line 1, column 1Prepared cscope connection
- Database
/example/cscope.out (connected)- Query g main
main.c:1: int main(void) { return 0; }
Windows
- main.c Active
int main(void) { return 0; }
Current-window location list
- 1
main.c:1: int main(void) { return 0; }
Documentation-backed illustration. +cscope and +quickfix; the connected database returns exactly the displayed main definition; csto=0, cscopequickfix=g-; main.c exists. :lcscope populates the current window's location list and jumps to its single definition. Primary help: :lcscope.
Details & Vim help
Like ":cscope" but uses location list. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :lcs[cope] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.