Count number of matches
You can use the search and replace functionality in vim to count the number of matches for that search like so:
:%s/transaction_id//n
You will see the result in the command tray like so:
8 matches on 8 lines
If you want to find matches global (that is, counting multiples per line), you can add the g
flag:
:%s/transaction_id//gn
for a response like:
13 matches on 8 lines
Tweet