vim quickfix avoid buffer change

后端 未结 2 1844
抹茶落季
抹茶落季 2021-01-13 07:57

I\'m using vimgrep with cw to open the search results in the quickfix buffer. Every time I select a line in the quickFix list the curs

2条回答
  •  心在旅途
    2021-01-13 08:34

    Assuming you are using to "select a line in the quickFix list", you can simply remap in the quickfix window so that you come back to the previous window after jumping to the matching line.

    Make sure you have filetype plugin indent on and add the line below to ~/.vim/ftplugin/qf.vim:

    nnoremap   p
    

提交回复
热议问题