DevDocs for vim
I’ve used DevDocs.io for quite a while now and find it so very helpful. It has all the docs you might find in an app like Dash, but available in the browser on all OSes (it works offline too). If you aren’t using a documentation tool already, I highly recommend DevDocs.
Once you’re familiar with DevDocs, I suggest integrating it with your editor. There are probably many integrations but I’ll be covering the installation of devdocs.vim to quickly access docs from vim.
Install the plugin using your vim plugin manager of choice, I like vim-plug. Add the following to your
.vimrc between the plug begin/end functions:
" In your .vimrc Plug 'rhysd/devdocs.vim'
Then install the plugin from within vim:
:source ~/.vimrc :PlugInstall
Rapid Doc Lookups
Now you can call
:DevDocsAll [search-term] or
:DevDocsUnderCursor to open the documentation of the word under your cursor, but this can be improved. Mapping
K, which is normally the command to find documentation in the man pages, to instead open DevDocs making the flow much better:
" In your .vimrc: nmap K <Plug>(devdocs-under-cursor)
Now anytime you’d like to find more information in the docs, hit the
K in normal mode. It will open your browser to DevDocs with the search pre-filled for that specific word.