How can I search using the vimgrep
command for a pattern in current dir recursively in all the files no mater what extension they have.
In console I can do: grep -r <pattern> *.*
After doing some search on google I found out that in vim I can search for a pattern recursively in files with certain extension like so:
:vimgrep /<pattern>/g **/*.extension
After reading the help from vim for :help starstar-wildcard
which I found in help vimgrep
I didn't find any explanation how can i match any file extension except the **/*
from the starstar-wildcard help.
Tried:
:vimgrep /<pattern>/g **/*
and I get this error: Cannot open file "**/*"
even tried to escape the wildcard character like so:
:vimgrep /<pattern>/g **/\*
same result Cannot open file "**/*"
My vim version is: VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 10 2014 09:33:13)
and I have tried with a new user without any .vimrc config file and the result is the same.
Is there a way to search like grep does but using :vimgrep inside vim?