New life from now
Showing posts with label
using Vim
.
Show all posts
Showing posts with label
using Vim
.
Show all posts
28 April, 2010
Counting occurrences of a pattern
Use the
:s
substitute command with the
n
flag (counts number of hits; no changes occur) to count the number of occurrences of a pattern. For example:
:%s/pattern//gn
Older Posts
Home
Subscribe to:
Posts (Atom)