Vim and Ctags tips and tricks [closed]

Ctrl+] – go to definition
Ctrl+T – Jump back from the definition.
Ctrl+W Ctrl+] – Open the definition in a horizontal split

Add these lines in vimrc
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
map <A-]> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>

Ctrl+\ – Open the definition in a new tab
Alt+] – Open the definition in a vertical split

After the tags are generated. You can use the following keys to tag into and tag out of functions:

Ctrl+Left MouseClick – Go to definition
Ctrl+Right MouseClick – Jump back from definition

Leave a Comment