Ⅰ. 插件描述A Vim plugin for looking up documentation
:source % :PluginInstall
对于Vundle版本 < 0.10.2，请用上面的Bundle替换Plugin。
:source % :NeoBundleInstall
:source % :PlugInstall
cd ~/.vim/bundle git clone https://github.com/keith/investigate.vim
A plugin for looking documentation on the word under the cursor.
You can choose to open it in a browser, with
Dash on OS X, or with an arbitrary
By default investigate is mapped to
gK. If you want to set up your
own mapping you should use something like this:
nnoremap <leader>K :call investigate#Investigate('n')<CR> vnoremap <leader>K :call investigate#Investigate('v')<CR>
With this mapping, using <leader>K when your cursor is on a specific
word will open its documentation. The [help
has tons of documentation on configuration. Here are some of the
If you want to open everything in Dash you need to set:
This value is ignored unless you're on OS X. If you want to use Dash
conditionally based off the current filetype you can set something like:
If you want to use something else, like a URL for a single type you'd
want to use this which will override the global Dash setting:
If you want to use a different keyword in Dash for a given language you
can set it by using:
This would set all Ruby files to open in the Rails documentation.
Note: If you're using a Dash 1.9.3 or newer you don't have to set this
for docsets that you have renamed.
If you don't like the website I chose as the default for a filetype you
can redefine it with:
^s will be replaced with the word under the cursor for Ruby
You can also open documentation with arbitrary shell commands. See
investigate-writing-commands in the documentation for more info.
Project specific settings
You can setup project specific settings with an
.invrc file from the
directory you launch Vim in. For example for a Rails project you may
want to set Ruby files to open Rails documentation for that single
project but not other Ruby gem based projects you're working on. To do
that the file would look something like this:
This will set a syntax variable:
Which entirely changes Ruby files to open in the Rails documentation.
investigate-conf-file for more information.
If you don't have a preferred installation method check out
If you find any bugs, want any languages added, or want any default
language settings changed, please submit an