1

From View man pages in Vim, I learnt how to open man pages in vim by adding the following lines to ~/.vimrc:

" Enable viewing man page in vim by ":Man ..."
runtime ftplugin/man.vim
" Set keyword 'K' to use ":Man ..." to view man pages in vim
set keywordprg=:Man

However, this can only work for one Man per tab. What I want is to open different Man pages in different splits.

  • man.vim contains code to reuse a existing "man" window. Copy ftplugin/man.vim into your personal setup and change it. – Ralf Jan 31 at 10:46
  • 1
    If you split in an existing man pane, the next :Man command only affects that pane – Thor Jan 31 at 15:30
  • @Thor That is awesome! – JiaHao Xu Feb 1 at 4:08
  • @Thor Can you make that an answer? – JiaHao Xu Feb 13 at 12:06
1

If there is only one manual window, all :Man commands affect that window. However if you split the window, any :Man command will affect the current or last used manual window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.