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

What do %a and # mean in VIM :buffers window?

Vim :buffers window

share|improve this question
up vote 8 down vote accepted

That information is contained in ":help :buffers". I will quote it here:

Indicators (chars in the same column are mutually exclusive):
u   an unlisted buffer (only displayed when [!] is used)
 %  the buffer in the current window
 #  the alternate buffer for ":e #" and CTRL-^
  a an active buffer: it is loaded and visible
  h a hidden buffer: It is loaded, but currently not
       displayed in a window |hidden-buffer|
   -    a buffer with 'modifiable' off
   =    a readonly buffer
    +   a modified buffer
    x   a buffer with read errors

So to answer your specific question, "%" means the current buffer in the window your cursor is in when you did ":buffers". "a" means a buffer you can currently see. Finally, "#" is the alternate buffer, which usually means the last buffer you were editing.

share|improve this answer

In addition, # and % are substituted for literal filenames when executing files. For example, when editing a Python file, if you type :!python %, it executes the current file as a Python file. Similarly, replacing % with # executes the alternate file. Very useful. :)

share|improve this answer

You must log in to answer this question.

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