Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to use a few lines somewhere in my vim window to show a list of all the files I have open, and what number they are (ie, which number I need to use to switch to them). Ideally, they would be lined up across the top of the screen, almost like tabs, to save room. I'm trying to prevent having to type :ls to get the number before I switch to a window.

share|improve this question

Vim 7 does have tabs, you can use these instead of buffers. To open a file in a new tab use :tabnew <filename>. :tabn and :tabp go forwards and backwards. See more info at

share|improve this answer
That's great! Do you know of anyway to use the standard buffer commands with tabs instead? – user3530 Feb 22 '10 at 21:10
And I'd vote you up, but I don't have any rep yet – user3530 Feb 22 '10 at 21:10
I don't but you appear to have found what you were after. – Martin Hilton Feb 22 '10 at 21:36

Maybe this might be useful to you...

map <F4> :ls<CR>:buffer<space>

put this in ur vimrc file.... now when you press <f4> you will be shown the list of buffers and prompted for the one to open.....

I found it somewhere... Whoever did this... its great....

share|improve this answer
up vote 0 down vote accepted

This is what I wanted:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.