Thursday, September 2, 2010

Re: Forcing Vim to use findstr as 'grepprg' on Windows

On Sep 1, 5:49 pm, Kyro El <zzmy...@gmail.com> wrote:
> I have trouble forcing Vim to use findstr /N as grepprg on Windows. I don't
> know what tricks does Vim do under the hood, but my grepprg is set to 'grep
> -nH $*' by default. However, while I do have a copy of grep in my path, it
> doesn't support the '-H' option.
>

The Vim help tells you exactly what goes on "under the hood".

:help 'grepprg' says:

'grepprg' 'gp' string (default "grep -n ",
Unix: "grep -n $* /dev/null",
Win32: "findstr /n" or "grep -n",
VMS: "SEARCH/NUMBERS ")

Note that nowhere is 'grep -nH $*' listed. You must be setting it
yourself in your configuration somewhere. Use :verbose set grepprg? to
find out where.

Note this also, from the same help location:
For Win32, the default is "findstr /n" if "findstr.exe" can be found,
otherwise it's "grep -n".

--
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

No comments: