Monday, June 25, 2007

VIM :: man pages invokation shortcut

I have finally found it. The very important shortcut I was missing long time. I knew it was there - but never actually managed to dig it up.

K

That's simple. It replaces my now archaic ":!man ".expand("<cword>") - use word under cursor and invoke 'K'eyword program on it. Keyword program is normally man. Can be configured with option 'keywordprg' (:help 'keywordprg' for more info).

If keywordprg is man, then VIM provides another cool feature: repeat count when used with K now tells to go to particular man section. e.g. 3K would invoke "man 3" on current word. What is very very cool.

1 comment:

geckos said...

Thanks, really helpful!