Wednesday, February 15, 2017

Re: Buffer number explodes when :vimgrep is called.

2017-02-15 3:00 GMT+03:00 <jrfranklin@georgiasouthern.edu>:
> Hello all,
>
> When I call :vimgrep, I'll usually search a directory of 600-1000 files. The number of unlisted buffers explodes after the call (I assume because buffers must be loaded into vim in order for the text to be searched). Lately I've been using buffer numbers for navigation, but entering three-digit buffer numbers has become annoying. Is this property of :vimgrep able to be switched off with a Vim setting? I'm surprised I can't find another instance of this question being asked online...
>
> On the note of buffer numbers, is it advisable that I side-step using buffer numbers for navigation/file switching and find a better way? What would more experienced users suggest?

I like fuzzy-finder plugins for navigating buffers. Specifically I use
Command-T which requires +ruby, but there are lots of alternatives:
unite/denite, CtrlP, FUF, ku, constructing something on top of tlib, I
also saw a Command-T reimplementation in Python somewhere.

My workflow also suggests that I open all project file with a single
shell command and then use Command-T to navigate through
already-created (though not yet loaded, Vim does not load all files
specified on command-line immediately) buffers because scanning
filesystem of large projects sucks; or, at least, sucket last time I
bothered to use it in Command-T: zsh does scanning much faster (also
because it does not attept to scan absolutely everything: I have
specific globs) though yet it can't beat `find` if you consider only
speed.

There is also a good replacement for :vimgrep: ag.vim uses less
verbose PCRE syntax (via ag aka the_silver_searcher), runs much faster
and will not load all files ag visits.

>
> Best,
> Jason
>
> --
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

No comments: