In vim, how can I count the number of characters on each line?
how to count number of characters?
For example, if I open a file with above text, I want to see counts like below
3 2 5 6 20
One way to do it:
This version shows the line number before the character count.
UPDATE: Even shorter (every keystroke counts!):
since I just now noticed that length defaults to entire line.
The question was about vim, but just for comparison, here is how you can do that in Vedit:
or as one-liner: