How to constantly see the current filename in vim

vim

I am using vim and I need a way to always be able to see the file that I am working on without having to do ^G.
I see the file name when I start vim but when I start to work and use various functions it gets lost.
Also I have seen other people have some kind of "addons" in the lower part of the vim console that seem like they are "button"/"tabs" (I am not sure how to describe them) that show various info constantly including the file name.
Any idea what are these plugins? Or how can I achieve what I want?

Best Answer

You can add this to your .vimrcfile, or temporarily while in vim.

  • vimrc - set laststatus=2
  • in vim - :set laststatus=2

To get the full path you can add this command, again to either your .vimrc or while in vim.

  • vimrc - set statusline+=%F
  • in vim - :set statusline+=%F

Examples

normal mode

                        ss #1

command line mode

                        ss #2

For more info than you care to read through there's additional info on both of these available in vim.

:help laststatus
:help statusline

References