Quickly searches documentation from DocHub.io for:
- CSS
- DOM
- HTML
- JavaScript
- JQuery
- PHP
- Python
To install using pathogen.vim:
cd ~/.vim/bundle
git clone git://github.com/stephenmckinney/vim-dochub.git
To install using neobundle.vim:
NeoBundle 'stephenmckinney/vim-dochub'
To install using vundle:
Bundle 'stephenmckinney/vim-dochub'
dochub.vim is enabled by filetype
. While editing a supported file,
simply place the cursor over a class, property, or method and type JJ
.
The plugin will then open a new tab in your browser (or a new instance of
the browser) to the related docs. That's it.
Documentation | Vim Filetypes |
---|---|
CSS | css, scss |
HTML | eruby, html, htmldjango |
JavaScript | javascript |
PHP | php |
Python | python |
The wildcards are documentation for DOM and JQuery, since they aren't
associated to a filetype
they have their own mapping:
JD
for DOM DocumentationJQ
for JQuery Documentation
By default, dochub.vim uses the open
command for OS X or the
xdg-open
command for other OSes to look up the docs. You can easily change the command.
For example:
let g:dochub_command='gnome-open'
Furthermore you can choose your own mapping in the following way:
let g:dochub_mapping='<C-h>'
- Ruby - vim-ruby-doc
- Ruby - ri.vim
This plugin started as a fork of vim-jquery-doc, but became it's own thing.
Copyright (c) Steve McKinney. Distributed under the same terms as Vim itself. See :help license
.