Split window and execute cscope command
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2Paint();Cursor on line 1, column 1Paint();Cursor on line 1, column 1void Paint(void) {}Cursor on line 1, column 1Split window and execute cscope command.
Connected cscope fixture
- Database
/demo/cscope.out- g Paint result
/demo/paint.c line 1: void Paint(void) {}- cscopetagorder
not relevant; direct cscope query
Windows
- main.c Active
Paint();
Command entered · ready to apply
Connected cscope fixture
- Database
/demo/cscope.out- g Paint result
/demo/paint.c line 1: void Paint(void) {}- cscopetagorder
not relevant; direct cscope query
Windows
- main.c Active
Paint();
Queries global definitions (g), splits the window and jumps to the sole Paint definition. main.c remains in the other window.
Connected cscope fixture
- Database
/demo/cscope.out- g Paint result
/demo/paint.c line 1: void Paint(void) {}- cscopetagorder
not relevant; direct cscope query
Windows
- paint.c Active
void Paint(void) {}
- main.c
Paint();
Before & after
Paint();Cursor on line 1, column 1Connected cscope fixture
- Database
/demo/cscope.out- g Paint result
/demo/paint.c line 1: void Paint(void) {}- cscopetagorder
not relevant; direct cscope query
Windows
- main.c Active
Paint();
void Paint(void) {}Cursor on line 1, column 1Connected cscope fixture
- Database
/demo/cscope.out- g Paint result
/demo/paint.c line 1: void Paint(void) {}- cscopetagorder
not relevant; direct cscope query
Windows
- paint.c Active
void Paint(void) {}
- main.c
Paint();
Subject: :scscope. Documentation-backed illustration; assumes +cscope, working cscope executable, connected prepared database, exactly this one match, splitbelow unset, switchbuf empty; not replay-verified. Queries global definitions (g), splits the window and jumps to the sole Paint definition. main.c remains in the other window.
Details & Vim help
Split window and execute cscope command. 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 :scs[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. This command requires a Vim build with +cscope support and the corresponding runtime/library or external tool.