Published: August 21, 2022 • 2 min read
One of my favorite programming tools is Dash. In this post, I’ll share some tips for leveraging this fantastic program.
Dash is a MacOS application that offers offline access to hundreds of API documentation sets.
With Dash, I can find the correct docs for any standard API in seconds. It’s an irreplaceable tool.
Here are my tips to use Dash better.
Clicking the search bar with a mouse and my arm? Pass.
command + L focuses
the Dash search bar.
Dash has several solutions for managing different docs of the same library. For example, I use Rails 7 for my side projects, and an older version at work. Unique search profiles are available, but I haven’t yet required that level of control. Instead, I use keywords.
Since I need results from my daytime version of Rails to come up first most of the time, that library gets the “rails” keyword. Rails 7 get “rails_current”.*
I can search either library by keyword:
rails: update_all opens the
update_all docs page in the older version, while
does the same in Rails 7.
Sharing your Dash docs with non-users doesn’t have to be painful. Click the upload icon on any docs page and you’ll get the documentation’s official URL in your paste buffer. It even includes a URL fragment (’#’) pointing to the function you need.
What if you don’t have the docsets downloaded, or you have them, but the API you want isn’t there? Search more broadly by integrating search engines into the search bar.
Choose between Google, DuckDuckGo, or Stack Overflow. Below all the search results, or first aren’t any, you’ll see the engines you’ve chosen.
A search for “elixir: noop” will search “elixir noop” in Google and DuckDuckGo, or “noop” on the Stack Overflow Elixir tag page.
Dash integrates with ~30 Mac programs! Here’s how I’ve integrated it with Vim.
With the dash.vim plugin, I can search Dash from Vim. Here’s how I’d execute a query from command mode:
:Dash update_all rails_current
This takes me to— you guessed it— the
update_all page of my Rails 7 docset
What are your favorite Dash tips? Let me know in the comments section.
Thanks to Dorian Karter for showing me Dash years ago.
* You can order libraries, too, so that if you don’t apply a keyword, one version will always show up before the other in the results list.
✉️ Get better at programming by learning with me. Subscribe to Jake Worth's Newsletter for bi-weekly ideas, creations, and curated resources from across the world of programming. Join me today!
Blog of Jake Worth, software engineer in Maine.