Tabs in vim

Wed, 2009-01-21

You can open several files in tabs from the command line with vim, just type:

vim -p file1 file2 file3

And each file specified on the command line will be opened in a new tab.

To open a file in a new tab inside vim use :tabe file

To close a tab do :tabc

You can quickly switch between tabs typing gt or gT in normal mode. To switch to a particular tab prepend the tab number to gt, i.e. type #gt, where #gt is the tab number.