Reputation: 450
Suppose I would like to find the number of occurrences of the word 'asd' in a part of file, eg., from line 21 to line 234. How would I do that in VIM?
Upvotes: 2
Views: 90
Reputation: 17360
Try this for counting
:21,234s/asd//gn
Edit
Since your vim is so old, try greping and count like
sed -n 21,234p filename | grep -o asd | wc -l
Upvotes: 3