Improve vim's K command by using programming-language specific help viewers

Sylvia 35d549581e Add support for calling a specific manpage 2 years ago
plugin 35d549581e Add support for calling a specific manpage 2 years ago
LICENSE 9b742778c5 Initial commit 2 years ago
README.md 35d549581e Add support for calling a specific manpage 2 years ago

README.md

vim-betterK

vim comes with a K command, which runs a program to lookup the keyword under the cursor. However, by default, the K command uses man for everything.

vim-betterK improves the K command by using appropriate locally installed help viewers depending on the programming language in question, instead of using man for everything.

How to use

vim-betterK overwrites the regular K command, functioning in the same way. Put your cursor on some text, or select some text in visual mode, and press K to get keyword information.

To call a specific manpage, regardless of the filetype-specific behaviour, prefix K with a count. For example, to check out the selection in man 3, type

3K

How to install

If you're using Vundle, add

Plugin 'https://notabug.org/SylvieLorxu/vim-betterK.git'

Default viewers

C: man 3; man 2 Haskell: hoogle; hoogle (online) Perl: perldoc PHP: pman Python: pydoc Ruby: ri sh: man 1 vim: built-in :help

License

GPLv3+