mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
6ff1e3fa1f
-range=-1 requires the current file to have at least <count> lines, whereas -addr=other doesn't. -addr=other also sets <count> to -1 by default when it is not specified, though this feature seems undocumented.
16 lines
429 B
VimL
16 lines
429 B
VimL
" Maintainer: Anmol Sethi <hi@nhooyr.io>
|
|
|
|
if exists('g:loaded_man')
|
|
finish
|
|
endif
|
|
let g:loaded_man = 1
|
|
|
|
command! -bang -bar -addr=other -complete=customlist,man#complete -nargs=* Man
|
|
\ if <bang>0 | call man#init_pager() |
|
|
\ else | call man#open_page(<count>, <q-mods>, <f-args>) | endif
|
|
|
|
augroup man
|
|
autocmd!
|
|
autocmd BufReadCmd man://* call man#read_page(matchstr(expand('<amatch>'), 'man://\zs.*'))
|
|
augroup END
|