I found myself switching back and forth between several different repositories on GitHub over the course of an afternoon. I got very tired of typing
github.com/blahblahorgname/firstfewlettersofrepo or however many characters were needed for the repo to show up in the suggestion list and then arrowing down to the entry I needed. (Yes, I could have used the bookmark bar, but I hate using the mouse when my hands are already on the keyboard.)
Hmm, surely there’s a better way, right? We HAVE the technology.
Turns out there is a better way. You can use the custom search engine feature in Chrome.
Open Chrome Settings and search for ‘manage search engines’. Click on the result, scroll down to ‘Other search engines’, and click on the Add button.
Type a description in the ‘Search engine’ field and what you want to use as your shortcut in the ‘Keyword’ field. In the ‘URL’ field, put the address you want your shortcut to go to and click the Add button. Ignore the note about ‘%s’ for now. I’ll talk about that in a bit.
Now, type what you used for the keyword into the address bar and hit Enter. Success!
Now, about that ‘%s’ thing — you can actually use this for searching as intended. Perform a search like you would normally on a site and look at the url of the result.
For instance, searching a GitHub repo for the word ‘chicken’ will take you to a url similar to this:
Now, let’s go back and add another search engine but now we’ll use the ‘%s’ replacement.
For my shortcuts, I just used the same keyword but added an ’s’ onto the end of it. (The keywords have to be unique.) In the URL field, I entered
https://github.com/lisadean/TheWailingChicken/search?q=%s. Notice I replaced ‘chicken’ (the search term I used) with ‘%s’.
Now, after adding this new entry, you can go to your address bar, type in the new keyword and hit space or tab and the prompt will change to look something like this.
You can enter your search term — I’m using ‘chicken’ again here — hit enter and it will perform a search and bring you to the results page.
Removing friction and annoyances like these are the little things that make me happy. They really do add up over time!
I found this little trick in an article full of other useful Chrome features you might not be aware of. Many of them I already knew about, some I didn’t. Might be worth a a read for you, too. 27 incredibly useful things you didn’t know Chrome could do