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

I recently discovered the Vim binding <C-^>, which toggles between the previous buffer and the current buffer.

But I can't find any mention of it in the docs, and it's naturally proven difficult to Google for. What's the Vim function called, or is there something similar which implements a buffer stack?

share|improve this question
I hope you're aware too that you can send it with <kdb>Ctrl</kbd><kbd>6</kbd> in gvim and many terminal emulators. – echristopherson Aug 22 '12 at 0:18
:help CTRL-^


:help ^^

works for me.

It's not just vim, either. The ^^ toggle-buffer command is is a standard vi feature going all the way back to ancient times.

In vim you also get the ^I and ^O commands which take you along a stack of previous positions, and they can jump from one buffer to another if you reach a point in the history where you had switched buffers.

And then there's :n[ext] :p[rev] and :rew[ind] which move you along the list of files that were named in the original command line. Those are also classical vi (ex) commands. vim adds some commands for altering that list of filenames too. See :help arglist

share|improve this answer
Right you are. I was looking for C-^ instead. – jogloran Aug 21 '12 at 3:02
Also :bn[ext], bp[rev]/bN[ext], br[ewind] for moving between currently-open buffers instead of just ones in the arglist. – echristopherson Aug 22 '12 at 0:20

You must log in to answer this question.

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