How do I show Filename, Line Count, and Character Count in vim?
Solution 1:
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
Solution 2:
In ~/.vimrc
, add the line:
set ruler
Solution 3:
save your file :w
then reload it :e
Solution 4:
- For the line count: edit the
.vimrc
file, and add to itset nu
- 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