Issue 09

Setting up a Google Chrome shortcut to Elixir documentation in 30 seconds

A guide for Elixir developers (and why you might want to)

Jan 6, 2023 · 2 minute read

If you're an Elixir developer, I can guarentee that you'll be spending a lot of time looking at Hexdocs - where Hex packages host their documentation.

And if you're anything like me, you'll usually google your way to the answer by searching for the package name followed by elixir or hex or phoenix.

Allow me to revolutionise the way your Elixir development journey by introducing you to a lesser known Google Chrome in-built feature called custom search engines.

Custom Search Engines?

A function of Google Chrome which lets you setup shortcuts to web addresses by using @ as a delimiter followed by an interpolated value.

There are a few default custom search engines that Chrome ships with, an example being the ability to search your history by typing: @history <search_term> straight into your address bar to find something in your Chrome history.


Did I just blow your mind?

What does this have to do with Elixir packages?

The other required chunk of knowledge is knowing that hexdoc urls all follow the following pattern:<NAME-OF-PACKAGE>/*

Do you see where we're going here?

I've set up my Chrome settings to allow me to type @hd ecto to get straight to the Ecto documentation - something I do several times a week!

How do I do this?

  • Manually navigate to chrome://settings/searchEngines
  • Under 'Site Search' add a new entry
  • Name the engine what you like (I used Hexdocs)
  • Add the shortcut of your choosing (I used @hd)
  • Under URL enter
  • Hit Save

And you're done!

Enjoy getting to Hex documentation without jumping through the Google hoop.

I hope you found this post useful, subscribe to my Substack below for similar content and follow me on Twitter for more Elixir (and general programming) tips.

If you're building a side project I'd also encourage you to take a look at!


Sign up to my substack to be emailed about new posts