Tab pages in vim

Window tabs are everywhere and you will find this in the curret version of vim too, which as of this writing is 7.0.042-0.fc5 on fedora-core-5.

Below are notes on how you can quickly navigate between open tabs:

  • Open several fies for editing in seperate tab pages:
    $ vi -p file1 file2 file3...
  • Goto next tab:


  • Goto previous tab:


  • Got to a numbered tab where "#" is a number:


  • Rewind to the first tab:
  • Open new tab page. Optionally you can provide a filename:
    :tabnew [filename]
  • Edit an existing file:
    :tabe {filename} 
  • Split the tab page:
    :tab split
  • Close all other tab pages:
  • Close current tab page:
  • To get help using tabpages:
    :tab help tabpages

See other related posts on vi.