Reading man pages with vim

You can use Vim to read the manpages of certain functions. If your cursor is over a function (word) and you press K it will load up the manpage for that keyword. By default it will load the standard linux manpages, but you can map it to something appropriate for the language you're editing.

" Map K to the appropriate man page program depending on language
:au FileType perl setlocal keywordprg="perldoc -f"
:au FileType php setlocal keywordprg=pman


Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 18.190.153.77
To prevent spam please submit by clicking the kitten: