This question was helpful for getting a count of a certain pattern in Vim, but it would be useful to me to store the count and sum the results so I can echo a concise summar
I think that answer above is hard to understand and more pretty way to use external command grep like this:
grep
:let found=0 :bufdo let found=found+(system('grep "" '.expand('%:p') . '| wc -l')) :echo found
" '.expand('%:p') . '| wc -l')) :echo found