Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

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?

share|improve this question
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.

share|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! – Matt Alexander 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. – Matt Alexander Jun 3 '11 at 18:24
By the way, I've found an even better solution: LustyJugglerAltTabMode. – Matt Alexander Jun 3 '11 at 18:27
That's cool. Thanks for the tip. – romainl Jun 3 '11 at 19:02

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .