Rodolfo Borges wrote:
I did the following command to open man pages inside Vim:
nmap K :Man <C-R><C-W><CR>
command! -bar -nargs=1 DoMan %!/usr/bin/man -P cat <args>
command! -bar -nargs=1 Man
\ new
\| DoMan <args>
\| %s/.^H//g
\| set filetype=man
\| goto 1
\| set buftype=nofile
It works nice, but I want also to be able to specify the man section,
mas many C commands are also bash or shell commands,
like "exit", "stat", and so on.
I'm sure it's written in the extensive online documentation,
but my lazyless is greater then my shame to ask it here. :)
Prefix the argument with the section name (1 character) or with -a for
"all sections", or with -S <list> where <list> is a semicolon-separated
ordered list of section.
Since DoMan (and Man) accept only one argument, separating spaces must
be escaped, which means you cannot do it with the above K mapping.
Best regards,
Tony.