How can I open the result of ctrl+] in a new split?
similar: How do I open a tag with ctrl+] but open it in an existing split?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communityHow can I open the result of ctrl+] in a new split?
similar: How do I open a tag with ctrl+] but open it in an existing split?
This will do it:
CTRL-W ] *CTRL-W_]* *CTRL-W_CTRL-]*
CTRL-W CTRL-] Split current window in two. Use identifier under cursor as a
tag and jump to it in the new upper window.
In Visual mode uses the Visually selected text as a tag.
Make new window N high.
courtesy: D. Ben Knoble
nnoremap <C-w>] :vertical stag <cword><CR>
. <C-w>]
and variants are just aliases for :stag <cword><CR>
if you read the description.
:help tag-function
. With regular <C-w>]
the flag 'c'
is passed, while your formulation passes an empty flag.
<C-w><C-]>
work?