man.vim 429 B

12345678910111213141516
  1. " Maintainer: Anmol Sethi <anmol@aubble.com>
  2. if exists('g:loaded_man')
  3. finish
  4. endif
  5. let g:loaded_man = 1
  6. command! -bang -bar -range=0 -complete=customlist,man#complete -nargs=* Man
  7. \ if <bang>0 | set ft=man |
  8. \ else | call man#open_page(v:count, v:count1, <q-mods>, <f-args>) | endif
  9. augroup man
  10. autocmd!
  11. autocmd BufReadCmd man://* call man#read_page(matchstr(expand('<amatch>'), 'man://\zs.*'))
  12. augroup END