The status line is very powerful and convenient, I think. Spilling out of the box will display the file name, cursor position and some flags. But you want to do the same as me, and replace the part of the file name with the full path to the file.
Thus, when editing my .vimrc my status line may look something like this: by default:
.vimrc 26,16 7%
You can view the status line settings with:
:set statusline?
But if you did not make any changes and not a single module changed it, it would be empty. But from the examples in the help section ( :help statusline ), you may find that by default:
:set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
So include this in your .vimrc and change %f to %f . I also added the added filetype ( %y ) flag to my status line, as I find it convenient. So, my resulting configuration is as follows:
:set statusline=%<%F\ %h%m%r%y%=%-14.(%l,%c%V%)\ %P
And the result will look something like this:
~/.vimrc [vim] 26,16 7%
Good reading:
PS. I am running vim 7.3
UlfR Feb 14 '14 at 10:07 2014-02-14 10:07
source share