I would be nice to have a flag for vimgrep to skip all the filetype
slow stuff when you want to do a large grep, and you know you don't
care about .gz files, etc., which I almost never do.



On 4/27/06, Benji Fisher <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 26, 2006 at 05:24:00PM -0700, Hari Krishna Dara wrote:
> >
> > On Wed, 26 Apr 2006 at 10:01pm, Yakov Lerner wrote:
> >
> > > 1. I did
> > >
> > >     :20verb vimgrep lakslaskjda $VIMRUNTIME/**
> > >
> > > and found, to my surprise,  that vim sources .viminfo and
> > > executes 'au BufRead'  for *every* searched file.
> > > This cannot but slow down.It's hundeds lines of unnecessary scripts
> > > per every searched file.
> >
> > I had a suspicion of this, but when I checked the buffer-list these
> > files didn't show up, so I presumed that Vim doesn't really load them as
> > regular buffers to do the search, so I wonder how the BufRead
> > autocommand gets fired.
>
>      According to
>
> :help grep
>
> "Vim loads each file as if it is being edited.  When there is no match
> in the file the associated buffer is wiped out again."
>
> (This is a few paragraphs up from :help :vimgrep .)  It also explains
> there the advantages and disadvantages of using the internal :vimgrep or
> an external grep program.
>
>      I find that with :ls! (but not :ls ) the buffers with matching text
> are listed.
>
> HTH                                     --Benji Fisher
>

Reply via email to