I'm relatively new to Vim. I've just installed EasyGrep but can't figure out how to open the files listed in the Quickfix List when I do a search. I can cycle through files containing a matching word using :cn
or open a file by double-clicking with my mouse but when I press <Enter>
nothing happens. I've also tried go
and t
but neither of these are working.
Can anyone help?!
Thanks in advance
As already mentioned by @ryuichiro, and then quoted by @Alistair Colling, the quickfix documentation (:h quickfix and :hquickref) provides an answer for how to open files within a quickfix list:
You can use
:.cc
to jump to the error under the cursor. Hitting the<Enter>
key or double-clicking the mouse on a line has the same effect. The file containing the error is opened in the window above the quickfix window.
Make sure that your <Enter>
Key (<CR>
) is not mapped so that it properly works. As already mentioned by @ryuichiro, this can be checked with
:verbose map <CR>
If you have a global mapping for <CR>
(e.g. in my case a mapping from the NERDtree plugin), you can undefine it just for when you are within a quickfix list based on adding the following line to your ~/.vimrc
as explained here:
autocmd BufReadPost quickfix nnoremap <buffer> <CR> <CR>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With