vim-utils / vim-man

View and grep man pages in vim
247 stars 32 forks source link

keywordprg support? (e.g. cppman) #22

Open bchretien opened 9 years ago

bchretien commented 9 years ago

cppman provides C++ 98/11/14 manual pages for Linux/MacOS, and it can be used in place of man when writing C++ code to easily access the standard library documentation:

autocmd FileType cpp set keywordprg=cppman

cppman

Apparently, vim-man explicitly uses man, so just to be sure, do you confirm that the only way to use cppman with vim-man would be to add cppman manpages to mandb? Note that this option is indeed available in cppman:

-m MANDB, --use-mandb=MANDB Accepts 'true' or 'false'. If true, cppman adds manpage path to mandb so that you can view C++ manpages with `man' command. The default value is 'false'.

However, I guess the nice Vim syntax highlighting for cppman (it is meant to be used with Vim as a pager) would be lost in the process.

bruno- commented 9 years ago

Hey @bchretien, I didn't know about cppman till now, it's interesting. vim-man explicitly calls man executable so yea, it won't work with cppman command.

But I wonder, why would you want to use cppman with vim-man?

As for the features: vim-man has some features that target the man command specifically, like command line completion and grepping the manpages. I don't see how these could be reused for cppman at all. It's probably easier to write cppman specific versions of those (if you want them).

Other than that, are there maybe some conflicts between cppman and vim-man?