Monday, October 15, 2012

Tabbed vim

I always felt like we should have tabs in vim so that I wont have to split screen using "vim -O option / ":vs". I just found that we can use tabs.

 vim -p < file1 > < file2 >

You can see that you can open multiple files and go to next file without saving (something you cannot do in multiple buffer). Youcan switch between files using tabn/tabp, but I do it as follows and use F5/6.

 :map <f5> :tabp <cr>
 :map <f6> :tabn <cr>