mirror of
https://github.com/neovim/neovim.git
synced 2026-01-04 10:26:42 +10:00
man.vim #5249
- fix synopsis highlighting in other locales. Cannot always rely on the first line for the section in some locales; instead, use the file path and explicitly set b:man_sect to the actual section. - eliminate separate s:man_args function - simplify logic: do not reuse buffer content - introduce b:man_default_sects Fixes #5233 - introduce <Plug>(man_vsplit), <Plug>(man_tab) - simplify regexps
This commit is contained in:
committed by
Justin M. Keyes
parent
94dfb6cea2
commit
f8fc8f51c0
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user