How do you use the “K”-button in the normal mode of VIM?

前端 未结 3 1320
失恋的感觉
失恋的感觉 2021-02-08 12:27

K is used to open manuals. I am interested how you use it. Can you use it to all kind of manuals, such as C, java and other things?

3条回答
  •  不要未来只要你来
    2021-02-08 13:23

    Yes. You need to update the keywordprg variable to point to a program that can lookup a keyword in the language of your choice. In general you can google for particular languages and solutions. Here are a couple of them

    • Java: http://vim.wikia.com/wiki/Vim_Doclet
    • Perl: http://vimrc-dissection.blogspot.com/2009/02/vims-keywordprg-for-perl-and-vim-itself.html

提交回复
热议问题