Quickfix list won't open

I am trying to use the quickfix list in gvim to search for grep. This is in windows and I am using grep from cygwin setting the following in my vimrc file:

set grepprg=C:/cygwin64/bin/grep

      

Grep works great when I do:

:grep -R 'LOG' **/*cpp

      

I see the first match and do: copen to open the quick fix list. When I'm there and want to go to a match, hitting it does nothing. Pressing Ctrl + W + Enter opens a new blank window. How do I make it so that when I press Enter or Ctrl + W + Enter it will open a window to the match location?

+3


source to share


1 answer


Vim's default mappings in the quickfix window are similar to what you say <cr>

and <c-w><cr>

(as pointed out in :h :lwindow

).

If these cards don't work, there are several problems that can arise:

  • You have some sort of mapping that highlights Vim's native mappings. Check if you have any mappings for <cr>

    while in quickfix window through :verbose nmap <buffer> <cr>

    and :verbose nmap <cr>

    . Do the same with <c-w><cr>

    .
  • Results can be ignored. A good way of saying is, if a match is ignored, the line will start with ||

    . This is often due to improper installation of 'grepformat'

    / 'grepprg'

    .


On a personal note, I found I grep

was slow in the past and now use ag silver finder or git grep

via the Fugitive.vim :Ggrep

command.

For more help see:

:h quickfix
:h :lwindow
:h 'grepformat'
:h :map-verbose

      

+7


source







All Articles