Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jump to definition in new tab

Tags:

vim

ctags

What i'm looking for is the following behaviour:

  • ^]
    Should open the definition below the cursor in a new tab instead of a new buffer and reuse already open tabs
  • ^O
    Should switch back to the previous location in the previous tab instead of switching the buffer of the current tab to the previous locations buffer
  • ^I
    Should behave accordingly

I tried

:set switchbuf=newtab

as well as

:set switchbuf=usetab

but both did not change any of the behaviour.

like image 607
barbaz Avatar asked Jun 30 '11 14:06

barbaz


1 Answers

Look here:

vim: Open tag in new tab

Basically, the idea is to do C-wC-]C-wT -- and then map that behaviour to the keys you like.

like image 142
sehe Avatar answered Oct 22 '22 03:10

sehe