Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do the symbols mean after running :ls in Vim?

Tags:

vim

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.

like image 760
Travis Northcutt Avatar asked Aug 09 '12 19:08

Travis Northcutt


People also ask

What does Ls do in Vim?

:ls is a Vim built-in command, which shows content of buffer list == list of your open files.

What does e do in Vim?

1 Answer. Show activity on this post. "Changed outside of Vim" means that the file that you're editing has been written to by another program. :e will load the latest version, and :e! will do that even if you have unsaved changes.

What does Ctrl F do in Vim?

Ctrl+f will search within the file ctrl+shift+f will search in all the files in the folder tree.


1 Answers

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: +.

like image 191
pb2q Avatar answered Oct 11 '22 17:10

pb2q