Dokumentary : Improve what K does.
script karma |
Rating 16/4,
Downloaded by 1364 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Gastón Simone |
|
script type |
utility |
|
description |
GitHub: https://github.com/gastonsimone/vim-dokumentary
Dokumentary improves what the K command does in Vim by customizing its behaviour, depending on the type of file you are editing.
Vim's standard K command for normal mode let's us easily run a program to lookup the keyword under the cursor. The program to run can be customized with the keywordprg (kp) option, whose default option is man.
This presents two problems:
1. The man command is the right choice only if you are writing a shell script or C code.
2. Vim only runs that command and waits for it to finish to continue using Vim, which sometimes is not the ideal, because you would like to see that documentation at the same time you are editing your file.
Dokumentary solves these two issues by doing the following:
1. It creates buffer-specific mappings for K and Visual-K, depending on the type of file you are editing. See the supported file types below.
2. It loads the retireved documentation in a vim window, so you can see the documentation together with your file and use all the Vim power to search and copy from it.
3. The default command is not man, but a system-specific dictionary. So if you are just reading plain text, K will show the definition of the word under the cursor. |
|
install details |
Vimball:
1. Download the zip file from this page.
2. Unzip it.
3. vim dokumentary.vmb
4. :so %
5. :q
Pathogen:
cd ~/.vim/bundle
git clone git://github.com/gastonsimone/vim-dokumentary.git
Once help tags have been generated, you can view the manual with :help dokumentary.
Vundle:
Just add this line
Plugin 'gastonsimone/vim-dokumentary'
to your .vimrc file, reload it and do the Vundle magic by running :PluginInstall. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.97.9.172
|