Monday, June 19, 2023

Re: how to ignore a dir for vimgrep but not for cmdline completion

On Mon, 19 Jun 2023 11:11:12 +0200
Tom M <7tommm@gmail.com> wrote:
> Hi all,
>
> Is there a way to ignore a dir when searching with vimgrep and not
> ignored when doing command line autocompletion? The wildignore option
> makes vim ignore the dir in both cases. Thanks in advance,

I don't know about :vimgrep, but in :grep, you can include/exclude files
or folders according to your ":h grepprg". I use "git grep" as my grep
program, so to exclude files or folders I do this.

:grep --no-index pattern -- :!folder :!file.txt

To reiterate, my 'grepprg' is set to this:
:let &gp = 'git grep --recursive-submodules -In $*'

--
Enan

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20230619163047.6a839383%40cirdan.

No comments:

Post a Comment