I'm using fzf's Rg command to populate QuickFix window with all search results. I also have my own mappings to :cn
and :cp
commands.
Everything is fine except one thing when I press mapped key for :cn
command new buffer is opened and the line with searched text is positioned very close to the bottom edge of window. So if I searched for function name I need to scroll down to see function's body.
Is there any way to change this behavior? I would like to position line with found text somewhere near the middle of the window.
:help :cn
, this "new buffer" is not standard behavior. That said,'switchbuf'
may influence the behavior. Can you check yours?switchbuf
is "usetab". I not fully understand what do you mean saying "new buffer" is not standard behavior. What is standard behavior then?:cn
was opening a new split, which would be bizarre. Nvm on that fromt