When I have more one one file open in vim (using split-screen), each commandstatus line (the last line in the window) looks like this:

filename.txt                           73,1            4%

That's the filename on the left, with the ruler position and percentage through the file on the right (via :set ruler).

However, when I only have one buffer open, the status line looks like:

                                       73,1            4%

How can I show the filename in all circumstances, even when there is only one file open?

link|improve this question

feedback

1 Answer

up vote 7 down vote accepted

That's the status line (:help status-line). To enable it when you only have one window, add to your .vimrc:

set laststatus=2
link|improve this answer
+1 very useful setting to put into your ~/.vimrc – sleske Sep 27 '10 at 17:18
Ah, I thought it was called the command line because that's the reference that came up with :help ruler -- the compiler option cmdline_info needs to be enabled. Question text edited. And thank you! – Ether Sep 27 '10 at 17:30
feedback

Your Answer

 
or
required, but never shown

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