39

After running the list buffers command (:ls) in Vim, what do the symbols displayed before some buffers mean? I know the percent sign (%) indicates the currently visible buffer. However, I also see the hash sign (#), and I can't figure out what that means. Googling this has proved fruitless.

3
  • 2
    To whomever downvoted: could you please explain why? Thanks. Commented Aug 9, 2012 at 20:12
  • 4
    I didn't downvote but as a rule of thumb: if you have any question regarding a vim command, asking vim for help is often not the worst idea: as pb2q answers, a simple :he :ls gives you anything you need... Commented Aug 10, 2012 at 8:15
  • 3
    @eckes Thanks for the info. I'm very new to Vim and didn't realize I could do that. Commented Aug 10, 2012 at 16:52

1 Answer 1

37

See :help :ls.

The hash sign marks the alternate buffer. This is useful for switching between two buffers: it's the buffer that you'll switch to when using e.g. :b#. This is the only thing resembling most recently used that you'll get with vim buffers, without plugins.

You also know from :ls which buffers have unsaved modifications: +.

Sign up to request clarification or add additional context in comments.

2 Comments

:help :ls is better, :help ls may pick some tag defined in some of the plugins.
@tnorthcutt If you're happy with the answer you should accept it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.