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.

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

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .