man.vim: convert ftplugin to actual plugin.

- do not create leader maps
- :norm! instead of :norm
- :keepjumps during layout
- use blackhole reg to avoid polluting unnamed reg
- format buffer name as "man://foo(2)"
- simulate behavior of `man`
    - buffer-local mapping of q to quit
    - open in new tab instead of new window
    - set 'nolist'
    - set tabstop=8
This commit is contained in:
Justin M. Keyes
2015-01-23 17:52:47 -05:00
parent 998d0ffc09
commit 4fb75d61c2
3 changed files with 166 additions and 180 deletions

6
runtime/plugin/man.vim Normal file
View File

@@ -0,0 +1,6 @@
if get(g:, 'loaded_man', 0)
finish
endif
let g:loaded_man = 1
command! -nargs=+ Man call man#get_page(<f-args>)