diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-09-03 14:01:04 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-09-03 14:01:04 -0400 |
commit | 2f6d3e599b3659dff3d62ecfc31066e93523e169 (patch) | |
tree | 84beea66a6e98ce48cd4921e42b4770e4f16bc03 /runtime/plugin/man.vim | |
parent | 94dfb6cea24180592af5c495dd9e8abf61d5735f (diff) | |
parent | c9e39f8227e320e156c92ee5192223304a9f1761 (diff) | |
download | rneovim-2f6d3e599b3659dff3d62ecfc31066e93523e169.tar.gz rneovim-2f6d3e599b3659dff3d62ecfc31066e93523e169.tar.bz2 rneovim-2f6d3e599b3659dff3d62ecfc31066e93523e169.zip |
Merge #5249 'man.vim'
Diffstat (limited to 'runtime/plugin/man.vim')
-rw-r--r-- | runtime/plugin/man.vim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/plugin/man.vim b/runtime/plugin/man.vim index f3fe7151ca..df457c2243 100644 --- a/runtime/plugin/man.vim +++ b/runtime/plugin/man.vim @@ -7,7 +7,13 @@ let g:loaded_man = 1 command! -range=0 -complete=customlist,man#complete -nargs=+ Man call man#open_page(v:count, v:count1, <q-mods>, <f-args>) -nnoremap <silent> <Plug>(Man) :<C-U>call man#open_page(v:count, v:count1, '', &filetype ==# 'man' ? expand('<cWORD>') : expand('<cword>'))<CR> +function! s:cword() abort + return &filetype ==# 'man' ? expand('<cWORD>') : expand('<cword>') +endfunction + +nnoremap <silent> <Plug>(man) :<C-U>execute 'Man ' .<SID>cword()<CR> +nnoremap <silent> <Plug>(man_vsplit) :<C-U>execute 'vertical Man '.<SID>cword()<CR> +nnoremap <silent> <Plug>(man_tab) :<C-U>execute 'tab Man ' .<SID>cword()<CR> augroup man autocmd! |