Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 14 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

In ~/.vimrc, add the line:

set ruler

share|improve this answer

save your file :w

then reload it :e

share|improve this answer
  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: - it is as simple as: g CTRL-G
share|improve this answer

Your Answer


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.