Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim command to jump to a tab (tabpage) containing the filename

Is there any command in vim with which I can jump to an already open tab containing the file which is open in the tab.

And that too with possibility of completion among all the open buffers.

For example you have following files open in different tabs.

  1. readme.txt
  2. pom.xml

Then the command jt will autocoplete the buffer names and jump to the tab containing the buffer.

like image 982
rangalo Avatar asked Sep 15 '10 11:09

rangalo


1 Answers

You can use the command :sb <buffer>

You'll have to :set swb=usetab, in order to use existing open window in another tab. Otherwise it will just split the current window.

like image 66
François Avatar answered Oct 17 '22 15:10

François