Ingo Karkat wrote:

> Hello Vim developers,
> 
> Someone on the Vim subreddit complained that :vimgrep does not obey the
> 'wildignore' setting, and therefore (slowly) searches files that the user 
> never
> wants to edit.
>     http://www.reddit.com/r/vim/comments/vqzqc/ignoring_files_in_vimgrep/
> 
> A similar question was asked on vim_dev in 2008, but never received an answer:
> 
> http://groups.google.com/group/vim_dev/browse_thread/thread/a9ad4995318e09dd/e2d3ce2a2306cdcb?lnk=gst&q=vimgrep+wildignore#e2d3ce2a2306cdcb
> 
> I interpret the 'wildignore' option as "anything in there, I never want to 
> open
> in Vim", and think that it should apply to :vimgrep as well:
> 
> 1. for consistency with similar functions such as :args {arglist}, which 
> ignores
> files in 'wildignore'
> 2. because the ultimate goal of it is opening files in Vim, and 'wildignore' 
> is
> an exclude list that the user declared not being interested in opening
> 3. because it can significantly speed up :vimgrep (this is what the OP
> complained about), avoid clutter in the resulting quickfix list
> 4. a nice side effect is that files in 'suffixes' are searched last
> 5. because with :grep, an alternative that matches any file exists
> 6. plugins with (a rare, unlikely) special need can temporarily reset 
> 'wildignore'
> 
> 
> Attached "vimgrep obeys wildignore.patch" implements this. There's only one
> other use of the affected get_arglist_exp() function, in :mkspell. I think 
> that
> there, 'wildignore' should not apply (though interference with spell files
> should be highly unlikely), so the change is a little bit more complex than 
> just
> swapping one function call for another.
> 
> "vimgrep obeys wildignore docs.patch" documents the new :vimgrep behavior.
> Additionally, I think that the documentation for 'wildignore' itself is a bit
> incomplete, so I'm re-attaching "wildignore docs enhancement.patch", an edited
> version of what I had already sent to this list in an earlier discussion about
> backtick-expansion.

Thanks!  I'll include it.

-- 
hundred-and-one symptoms of being an internet addict:
68. Your cat always puts viruses on your dogs homepage

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui