Split window and do :tselect for tag under cursor
Ctrl-w g]
Example
Normal 0 / 2Awaiting choice 1 / 2Normal 2 / 2call print
keepCursor on line 1, column 6call print
keepCursor on line 1, column 6void print(void) {
return;
}Cursor on line 1, column 1Split window and do :tselect for tag under cursor.
Prepared tag index
library.c:1alternate.c:1
Illustrated windows
- example.c Active
Active source
Show matching tags and await a choice in the original window; no split has been created.
Prepared tag index
library.c:1alternate.c:1
Tag selection
- 1
library.c:1 print- 2
alternate.c:1 print- Prompt
Type number and <Enter> (q or empty cancels):
Illustrated windows
- example.c Active
Original window; choice pending
Choose the library.c definition and create its new upper split.
Prepared tag index
library.c:1alternate.c:1
Illustrated windows
- library.c Active
Selected tag definition
- example.c
Original window
Before & after
call print
keepCursor on line 1, column 6Prepared tag index
library.c:1alternate.c:1
Illustrated windows
- example.c Active
Active source
void print(void) {
return;
}Cursor on line 1, column 1Prepared tag index
library.c:1alternate.c:1
Illustrated windows
- library.c Active
Selected tag definition
- example.c
Original window
ILLUSTRATION. Two prepared print tags exist. Choose entry 1 in the illustrated tag-selection prompt; splitbelow is off, and space is available. The split is created only after choosing a tag, not while the choice is pending. Sources are mock workspace data.
Details & Vim help
Split window and do :tselect for tag under cursor. Use in Normal mode. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.