0

How to store the result of %s/My_search//gn into a variable in vim.?

I need to the first word from the result.

means if the result is 3 matches on 5 lines then, i want that word "3"

edi9999
  • 19,701
  • 13
  • 88
  • 127
Zam
  • 367
  • 2
  • 17
  • What did you try and what do you want to do with that information? – romainl Dec 21 '15 at 08:42
  • I want to find the total occurance of my search pattern. (only the exact count). and paste that output into vim – Zam Dec 21 '15 at 08:47
  • See http://stackoverflow.com/questions/2573021/how-to-redirect-ex-command-output-into-current-buffer-or-file to redirect output to a variable or buffer – edi9999 Dec 21 '15 at 09:37

0 Answers0