wildignore in macvim
-
Nick Carter
So I've tried setting this to both a quote-delimited string and without delimiters, but it doesn't seem to be excluding the directory I've specified.
In this case I'm running :set wildignore+=out/**
This should remove all files from the out directory (relative to the cwd at the moment) correct? I still see matches under out after running this.
-
Nick Carter
Seems I needed to add this to an autocommand, which I've done. I do see out/ results, but they're further down the list which is good enough for now.
-
Greg Hurrell
Yep,
:set wildignore+=out/**should definitely work.Can you post the contents of your
~/.vimrcand also the output of:set wildignore? -
Nick Carter
Contents follow. This is from my work machine, which is slightly different from the one at home and which I haven't gotten CommandT working on yet:
color vilight set ic set hls is set si set foldmethod=indent set foldnestmax=10 set nofoldenable set foldlevel=1 set nu set backspace=indent,eol,start set noro set nowrap set tabstop=2 set shiftwidth=2 set autoindent set wildignore+=out/** filetype plugin on syntax on set guifont=Lucida_Console:h14:cANSI set guioptions=""
"this wildignore should also affect :vim searches is my understanding, and they are still coming back with results from out/
-
Greg Hurrell
Not sure if
'wildignore'affects:vimsearches or not. Perhaps it does.In any case, You can test the effect of your
'wildignore'setting by calling theexpand()function.For example, just say your
'wildignore'contains 'foo' and you're in a directory with files "foo" and "bar":-
:echo expand("foo")will echo nothing at all, because the "foo" file in the current directory is filtered out by the'wildignore'setting -
:echo expand("bar")will echo "bar", because "bar" is not filtered out -
:echo expand("baz")will echo "baz", because even though "baz" doesn't exist in the current directory, neither does it get filtered out
So, if your settings are correct, then
:echo expand("out/foo/bar")should echo nothing at all. -
Reply
This topic is now closed.