vim-manpager is plugin to use Vim as a MANPAGER.
It also improve the behavior of :Man
command and mappings in man
file.
See lambdalisue/vim-pager for PAGER.
" Vundle.vim
Plugin 'lambdalisue/vim-manpager'
" neobundle.vim
NeoBundle 'lambdalisue/vim-manpager'
" neobundle.vim (Lazy)
NeoBundleLazy 'lambdalisue/vim-manpager', {
\ 'autoload': {
\ 'commands': 'MANPAGER',
\}}
To open vim via man
command, use the following settings in your shell.
$ export MANPAGER="vim -c MANPAGER -"
$ man git
In Vim, you can use Man
command to open a man page (the plugin overwrite the
default Man
command defined in default ftplugin/man.vim
to improve the
behavior)
:Man git
In man buffer, you can use the following keymaps
K
Open the manual page for the word under the cursorEnter
Open the manual page for the word under the cursorCtrl-]
Open the manual page for the word under the cursor2-LeftMouse
Open the manual page for the word under the cursorTab
Open next manual page in the historyShift-Tab
Open previous manual page in the history]t
Find next keyword and move the cursor onto[t
Find previous keyword and move the cursor ontoq
Close the manual page