diff options
Diffstat (limited to 'runtime/plugin')
| -rw-r--r-- | runtime/plugin/man.vim | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/runtime/plugin/man.vim b/runtime/plugin/man.vim index 82ef154725..b5b118fbe3 100644 --- a/runtime/plugin/man.vim +++ b/runtime/plugin/man.vim @@ -5,6 +5,15 @@ if exists('g:loaded_man') endif let g:loaded_man = 1 -command! -count=0 -complete=customlist,man#complete -nargs=* Man call man#open_page_command(v:count, v:count1, <f-args>) +command! -count=0 -complete=customlist,man#complete -nargs=* Man call man#open_page(v:count, v:count1, <f-args>) -nnoremap <silent> <Plug>(Man) :<C-U>call man#open_page_mapping(v:count, v:count1, &filetype ==# 'man' ? expand('<cWORD>') : expand('<cword>'))<CR> +nnoremap <silent> <Plug>(Man) :<C-U>call man#open_page(v:count, v:count1, &filetype ==# 'man' ? expand('<cWORD>') : expand('<cword>'))<CR> + +augroup man + autocmd! + autocmd BufReadCmd man://* call man#read_page(matchstr(expand('<amatch>'), 'man://\zs.*')) + " Need this because without it, if you do ':Man printf(3)' and then later, + " open a session that contains a buffer named 'man://printf(3)', the buffer + " will become listed. + autocmd BufEnter man://* set nobuflisted +augroup END |