How do I show Filename, Line Count, and Character Count in vim?
--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Dream Voyager Looping
--
Chapters
00:00 How Do I Show Filename, Line Count, And Character Count In Vim?
00:28 Answer 1 Score 13
00:39 Accepted Answer Score 19
00:53 Answer 3 Score 4
01:03 Answer 4 Score 2
01:17 Thank you
--
Full question
https://superuser.com/questions/459572/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#vim
#avk47
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Dream Voyager Looping
--
Chapters
00:00 How Do I Show Filename, Line Count, And Character Count In Vim?
00:28 Answer 1 Score 13
00:39 Accepted Answer Score 19
00:53 Answer 3 Score 4
01:03 Answer 4 Score 2
01:17 Thank you
--
Full question
https://superuser.com/questions/459572/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#vim
#avk47
ACCEPTED ANSWER
Score 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
ANSWER 2
Score 13
In ~/.vimrc
, add the line:
set ruler
ANSWER 3
Score 4
save your file :w
then reload it :e
ANSWER 4
Score 2
- 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