vim-easygrep icon indicating copy to clipboard operation
vim-easygrep copied to clipboard

Problem when setting 'ag' as grep command

Open hiberabyss opened this issue 9 years ago • 1 comments

When with following setting:

set grepprg=ag\ --nocolor\ --nogroup\ --vimgrep\ $*

Search something with \vv, following error occurs: image

The reason is that ag does not support multiple --file-search-regex, while the generated grep commands looks like this:

ag --file-search-regex="\.h"  --file-search-regex="\.cpp" 'search pattern'  to/path

hiberabyss avatar Oct 31 '16 11:10 hiberabyss

I also use ag due to its significant search speed. The referenced commit just disables file type selection. This could however be implemented using ag --file-search-regex="(\.c|\.h)$" <regex> for several file types. It would need a refactoring of the implementation and options to support another way of passing multiple file types.

ubmarco avatar Dec 19 '19 08:12 ubmarco