Vim Recall繁體中文

Split window and execute cscope command

:scscope

Example

Normal 0 / 2
Paint();
Cursor on line 1, column 1

Split 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();
Before & after
Before
Paint();
Cursor on line 1, column 1

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();
After
void Paint(void) {}
Cursor on line 1, column 1

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();

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.