Go to definition in a new tab

I am looking for the following behavior:

  • ^]
    Should open the definition below the cursor in a new tab instead of a new buffer and reuse tabs that are already open
  • ^O
    To return to the previous location on the previous tab, instead of switching the buffer of the current tab to the buffer of previous locations
  • ^I
    Must behave accordingly

I tried

 :set switchbuf=newtab 

and

 :set switchbuf=usetab 

but both have not changed any behavior.

+8
vim ctags
source share
2 answers

Look at here:

vim: Open tag in new tab

Basically, the idea is to make Cw C-] Cw T - and then match this behavior with the keys you like.

+5
source share

I wrote a plugin that not only drags the tag into a new tab, but also returns to the correct tab again when you press <Ct> to bounce back. https://github.com/ipod825/TagJump

0
source share

All Articles