Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When you first launch vim with vim myfile.c, in the bottom-left of the screen it shows the filename in quotes, the number of lines, then the character count. It disappears the minute something else needs that real estate. How do I get it back?

I know :echo @% can get you the filename, but that's only 1/3 of the way there.

share|improve this question
add comment

4 Answers

up vote 9 down vote accepted

You can get the character and line count by typing g Ctrl-G. To see the filename and line count as you do when you open a file, execute :f. See

:help g_CTRL-G
:help :f
share|improve this answer
add comment

In ~/.vimrc, add the line:

set ruler

share|improve this answer
add comment

save your file :w

then reload it :e

share|improve this answer
add comment
  1. For the line count: edit the .vimrc file, and add to it set nu
  2. Character count: someone has already asked for that and an answer has been given: http://superuser.com/a/149947/151320 - it is as simple as: g CTRL-G
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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