i just started using Vi/Vim editor and while i m checking the list of active buffers for the buffer i m using i get this line:

1 %a + "buffername"                   line 16    

What does %a + represent in the line?

I know that:

  • 1 - represents the numbered buffer
  • "buffername" - represents the named buffer
  • line 16 - how many lines there are in the file under that buffer.

Thanks :)

  • 1
    By the way, there's a Stack Exchange dedicated to Vim: Vi and Vim
    – muru
    Nov 27 '18 at 15:06

See :h :ls:

:ls[!] [flags]
    Show all buffers.  Example:

            1 #h   "/test/text"             line 1 
            2u     "asdf"                   line 0 
            3 %a + "version.c"              line 1 

    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
       R    a terminal buffer with a running job
       F    a terminal buffer with a finished job
       ?    a terminal buffer without a job: `:terminal NONE`
        +   a modified buffer
        x   a buffer with read errors

So %a + indicates that that buffer is:

  • the buffer in the active window
  • an active buffer
  • a modified buffer
  • 1
    Thank you very much Muru. That solved my question :) Nov 27 '18 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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