I have installed tags so I can jump to a function body in another file via CTRL + ]I know that I can do gf to jump to another file.I know that I can do CTRL-w s to split the vim window.What I don't know and I am very interested in, is how can I combine the first 2 with the last.I.e. how could I jump to another file via tag or gf opening the file in a separate tab?
How can I jump to files from vim opening them in a separate tab?
linux;vim;vimrc
You can split and open a new file at the named tag with the command :stag, it appearsto default to the binding Ctrl-w, Ctrl-].You could bind that to whatever then:map <F2> :stagIf needs to be done in a tab, then, you can do it in two steps:Ctrl-w,Ctrl-] Ctrl-w, TOr you can map it:map <F2> :tab split <CR>:exec(tag .expand(<cword>))<CR>For the gf equivalent of opening in new tabCtrl-w,gf or window split:Ctrl-w,f And again if you want to split AND then open in new tab,Ctrl-w,f Ctrl-w, T