Is there a vimgrep method limiting> 1 but not all file types?

I'm also used to doing:

:vimgrep /whatever/ **/*

or

:vimgrep /whatever/ **/*.txt

but is there a way with vim globbing to do, say, 2 types of files? I think I want something like this:

:vimgrep /whatever/ \*\*/.(txt|vb)
+3
source share
4 answers
:vimgrep /whatever/ *.{txt,vb}

I think what you are looking for.

+8
source

try it

:vimgrep /whatever/ *.txt *.vb
+3
source

vimgrep, () perl- find + grep + xargs. vim :

:Searchfile txt,vb whatever
0

, EasyGrep. , , ( ), , .

For example: when you open test.cpp, files matching any of * .cpp * .hpp * .cxx * .hxx * .cc * .c * .h will be found at the start of the search. You can also define your own relationships or create your own order on demand.

0
source

Source: https://habr.com/ru/post/1779629/


All Articles