Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

3 Answers 3

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 http://vim.cybermirror.org/runtime/doc/tabpage.txt.

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
up vote 0 down vote accepted

This is what I wanted: http://vim.sourceforge.net/scripts/script.php?script_id=159

share|improve this answer

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

Your Answer

 
discard

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.