37927Re: Patch to add the vimgrep command
- Nov 19, 2004Mikolaj Machowski wrote:
> Dnia pi±tek, 5 listopada 2004 02:36, Yegappan Lakshmanan napisa³:When using ":grep" and setting 'grepprg' to something specific to use
> > Hi all,
> > The attached patch implements the vimgrep command. This patch
> > is against the Vim 6.3 sources.
> > The syntax of the command is:
> > :vimgrep <pattern> <filename(s)>
> That's great!
> One organizational thing: wouldn't it be better to make it an option to
> :grep command and 'grepprg' option - "builtin" - like for 'term' option?
> Note: this is question to Bram and other users so don't hurry to make it
> real :)
internal grepping, it's easier to type the command. But it will not be
compatible with previous versions, since the Vim pattern works a bit
different from the external grep program.
When using ":vimgrep" it's easy to switch between external and internal
grepping. The only disadvantage appears to be that the command is
longer to type.
It would also be possible to do both: Supply ":vimgrep" that always does
it internally, and allow setting 'grepprg' to make ":grep" work
internally. That at least makes ":grep" work for systems that don't
have an external grep command. And scripts can use ":vimgrep", as it
works the same way on all systems.
"Hegel was right when he said that we learn from history that man can
never learn anything from history." (George Bernard Shaw)
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
- << Previous post in topic Next post in topic >>