Using Vim 8. I want to count the number of pipe symbols that are on the current line so that I can compare it to the other lines in the file and make sure my pipe symbol count is consistent. How do I do this?

1 Answer 1


You can count occurrences by search/replace without actual change with n option.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.