mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
f895b47d3f
mandoc may not handle quoted MANPAGER arguments correctly. E.g. with export MANPAGER='nvim -u NORC -c "set ft=man"' mandoc treats `"set` and `ft=man"'` as separate tokens. To workaround that, provide :Man! so that MANPAGER can avoid quoting. closes #9120
16 lines
429 B
VimL
16 lines
429 B
VimL
" Maintainer: Anmol Sethi <anmol@aubble.com>
|
|
|
|
if exists('g:loaded_man')
|
|
finish
|
|
endif
|
|
let g:loaded_man = 1
|
|
|
|
command! -bang -bar -range=0 -complete=customlist,man#complete -nargs=* Man
|
|
\ if <bang>0 | set ft=man |
|
|
\ else | call man#open_page(v:count, v:count1, <q-mods>, <f-args>) | endif
|
|
|
|
augroup man
|
|
autocmd!
|
|
autocmd BufReadCmd man://* call man#read_page(matchstr(expand('<amatch>'), 'man://\zs.*'))
|
|
augroup END
|