jremmen / vim-ripgrep

Use RipGrep in Vim and display results in a quickfix list
MIT License
543 stars 99 forks source link

Viewing through output window #15

Open ghost opened 7 years ago

ghost commented 7 years ago

Like tagbar plugin that we can press p key to jump to definition but keep stay on tagbar window.
It'd be great if we can add this feature to vim-ripgrep.

jremmen commented 6 years ago

I'm not sure I understand the suggestion. Could you expand a bit more on the idea?

craigjb commented 6 years ago

If you add this to your .vimrc, you should get the behavior you're looking for: nnoremap <expr> p (&buftype is# "quickfix" ? "<CR>\|:copen<CR>" : "p")

When in the quick fix window, this will display the selected item and then change focus back to the quick fix window.