Saari Development

Ali Rizvi's Technical Blog as a Professional Software Development Engineer

Vim: Tabs like firefox in non-gui vim

leave a comment »

This might be old news for some but today I discovered firefox like tabs (not to be confused with tab character for indenting) in vim (not gvim).

To open a file in a new tab while inside vim simply do:

:tabe filename

To open all files in a directory in vim tabs from command line do:

vim -p dir_name/*

To move around in tabs in command mode you do:

gt

It is hard to google for them as it is easy to confuse them with tab character. Here is the online doc page for them:
http://vimdoc.sourceforge.net/htmldoc/tabpage.html

The current tab was setup to be not underlined vs other tabs were underline I discovered the way to show current tab in reverse:

:highlight TabLineSel cterm=reverse

Of course the options are endless and when I shared this discovery with Arnab he told me there is an entire chapter about this in the swroopch’s Vim book actually it one section in his Book.

Thank you Daniel Wong for introducing me to vim tabs. It was instant pay off on encouraging Daniel to use either use a real programmers’ editor like Vim or Emacs instead of gedit and teaching him the basic Vim (once he choose my choice of text editor on his own, I did not pressure him, honest).

Advertisements

Written by imsaar

October 14, 2009 at 10:17 pm

Posted in editor, vim

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: