Brendan Dawes

Analogue + Digital


Vim + Dash = Killer Documentation Lookup

Dash is a great documentation app that I use a lot to look up methods for the various languages I use. I used to fire-up a browser and Google for the term I was looking for, but with Dash it makes it so much easier.

However when you combine that with an easy way to look up a certain method directly from your IDE — in my case Vim — then it becomes even more useful.

I recently chanced on this lovely Dash plugin for Vim which means — after mapping d in my .vimrc — I can press ,d when the cursor is over a term and Dash is instantly brought to the front complete with the documentation for that term (it knows what language I'm working in). If it can't find that term it will show a Google and Stackoverflow search.

Dash triggered from Vim

Here's the mapping I added in my .vimrc to trigger the plugin:

nnoremap <leader>d :Dash<cr>