Show the count visually using :s
This replaces nothing, but prints the count per line:
Explanation:
-
s= substitute -
|= the character you are counting -
g= find all occurrences, not just the first -
n= report the count instead of replacing
Vim will show something like:
Run it on multiple lines by selecting a range (e.g., entire file):
No comments:
Post a Comment