File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,16 @@ Default man command is '/usr/bin/man', but it can be changed:
116116>
117117 let g:vim_man_cmd = 'LANG=ja_JP.UTF-8 /usr/bin/man'
118118<
119+
120+
121+ man_split_type *g:man_split_type*
122+ Change the default split type when using | :Man | . Valid values are
123+ 'horizontal' , 'vertical' , or 'tab'
124+
125+ >
126+ let g:man_split_type = 'horizontal'
127+ <
128+
119129CONTRIBUTING *man-contributing* *man-bugs*
120130
121131Contributing and bug fixes are welcome. If you have an idea for a new feature
Original file line number Diff line number Diff line change @@ -10,15 +10,19 @@ if !exists('g:vim_man_cmd')
1010 let g: vim_man_cmd= ' /usr/bin/man'
1111endif
1212
13- command ! -nargs =* - bar -complete =customlist ,man#completion#run Man call man#get_page (' horizontal' , <f-args> )
13+ if ! exists (' g:man_split_type' )
14+ let g: man_split_type = ' horizontal'
15+ endif
16+
17+ command ! -nargs =* - bar -complete =customlist ,man#completion#run Man call man#get_page (g: man_split_type , <f-args> )
1418command ! -nargs =* - bar -complete =customlist ,man#completion#run Sman call man#get_page (' horizontal' , <f-args> )
1519command ! -nargs =* - bar -complete =customlist ,man#completion#run Vman call man#get_page (' vertical' , <f-args> )
1620command ! -nargs =* - bar -complete =customlist ,man#completion#run Tman call man#get_page (' tab' , <f-args> )
1721
1822command ! -nargs =+ - bang Mangrep call man#grep#run (<bang> 0 , <f-args> )
1923
2024" map a key to open a manpage for word under cursor, example: map ,k <Plug>(Man)
21- nnoremap <silent> <Plug> (Man) :<C-U> call man#get_page_from_cword('horizontal' , v:count)<CR>
25+ nnoremap <silent> <Plug> (Man) :<C-U> call man#get_page_from_cword(g:man_split_type , v:count)<CR>
2226nnoremap <silent> <Plug> (Sman) :<C-U> call man#get_page_from_cword('horizontal', v:count)<CR>
2327nnoremap <silent> <Plug> (Vman) :<C-U> call man#get_page_from_cword('vertical', v:count)<CR>
2428
You can’t perform that action at this time.
0 commit comments