How do I set up a buffer switch like Alt-Tab on Windows:? It cycles through a list sorted by last access first? So if I pressed Alt+Tab, I'd get the last accessed buffer. If I pressed it again, I would go back to the first file. If I pressed Alt+(Tab,Tab) I would go the second to last access buffer. Unlike the existing Ctrl+6 in Vim, I wouldn't want unopened buffers to be a part of the list.

Any suggestions?

link|improve this question

feedback

2 Answers

up vote 1 down vote accepted

LustyJuggler works almost exactly as you describe.

Hit <leader>b to open a list of buffers with the most recent first, type a couple of letters to narrow the list down to the one you want and finally <CR> to open it.

I personnaly use its sibling LustyExplorer which offers the same feature plus a similar one for the filesystem and a similarly designed "search in buffers" as well.

link|improve this answer
I ended up using LustyJuggler so I could recreate my familiar kaystrokes using some mappings. It's not <C-Tab>, <C-Tab><C-Tab>, and <C-Tab><C-Tab><C-Tab>, which is what I'm used to, but that's okay. This will soon become a part of my fingers. Thanks! – mattalexx Jun 2 '11 at 18:30
Vim is a world of its own. You'll find it's sometimes quite hard to apply your ancient habits and workflow. It'll pay if you do things the Vim way. – romainl Jun 2 '11 at 19:21
Yes, that's what I've found. – mattalexx Jun 3 '11 at 18:24
By the way, I've found an even better solution: LustyJugglerAltTabMode. – mattalexx Jun 3 '11 at 18:27
That's cool. Thanks for the tip. – romainl Jun 3 '11 at 19:02
feedback

I like the minibufexplorer plugin. It gives you a small list of open buffers at the top of a windows, that sort of looks like the tabbar in Firefox, and it allows you to close buffers (or at least remove them from the list).

It allows you to use ctrl-tab and shift-ctrl-tab to navigate backwards and forward through the list of tabs, if you want to. Not alt, though, but I guess you could make a map to do that yourself.

http://www.vim.org/scripts/script.php?script_id=159

link|improve this answer
The backwards and forwards switching you describe is based on a list sorted by time opened, not last viewed. – mattalexx Jun 2 '11 at 17:34
feedback

Your Answer

 
or
required, but never shown

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