16

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.

MattSayar
  • 343

4 Answers4

19

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
garyjohn
  • 36,494
13

In ~/.vimrc, add the line:

set ruler

deesto
  • 322
  • 1
  • 7
4

save your file :w

then reload it :e

HVNSweeting
  • 908
  • 1
  • 9
  • 17
2
  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: https://superuser.com/a/149947/151320 - it is as simple as: g CTRL-G