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:
116
116
>
117
117
let g:vim_man_cmd = 'LANG=ja_JP.UTF-8 /usr/bin/man'
118
118
<
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
+
119
129
CONTRIBUTING *man-contributing* *man-bugs*
120
130
121
131
Contributing 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')
10
10
let g: vim_man_cmd= ' /usr/bin/man'
11
11
endif
12
12
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> )
14
18
command ! -nargs =* - bar -complete =customlist ,man#completion#run Sman call man#get_page (' horizontal' , <f-args> )
15
19
command ! -nargs =* - bar -complete =customlist ,man#completion#run Vman call man#get_page (' vertical' , <f-args> )
16
20
command ! -nargs =* - bar -complete =customlist ,man#completion#run Tman call man#get_page (' tab' , <f-args> )
17
21
18
22
command ! -nargs =+ - bang Mangrep call man#grep#run (<bang> 0 , <f-args> )
19
23
20
24
" 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>
22
26
nnoremap <silent> <Plug> (Sman) :<C-U> call man#get_page_from_cword('horizontal', v:count)<CR>
23
27
nnoremap <silent> <Plug> (Vman) :<C-U> call man#get_page_from_cword('vertical', v:count)<CR>
24
28
You can’t perform that action at this time.
0 commit comments