Hacker News new | ask | show | jobs
by rekoil 852 days ago
For me it's how user-defined search engines work. In Chromium-based browsers you can just supply a URL-template, a name, and a shorthand, and you're off to the races, it takes 10 seconds to add one.

In Firefox it used to be you needed to like create your own little mini-addon or something like that, and these days they have "smart bookmarks", but it's such a weird name and doesn't really work the same.

At any rate, I have 100 different little shortcuts defined like for example "tren" which takes the given text, puts it into a translator, and auto-detects language and translates to English. Ditto "sven", "ensv", "trsv", then I have "wiki", "wikise" (Wikipedia Sweden), "wikt", "aw" (ArchWiki), etc., etc.

I use these hundreds of times a day, and when I tried converting to Firefox (before I eventually landed on Brave) I couldn't find a simple way of moving these from my Google Chrome profile to Firefox and have it work like I expect it to. Perhaps that's possible now?

4 comments

In Firefox you right click on a website's search field and select "Add keyword for this search". The you can use "<keyword> whatever you're searching" in the address bar and it will take you right to the results page.

It works great but is poorly advertised and not particularly discoverable... They're stored as bookmarks so it should be possible to import them.

It's not the same, and you can't import them from Chrome, but I'll share what works for me just in case it works for you as well. Which is: set DuckDuckGo as your default search engine, and use their "bangs" - you'll be able to guess most of them, and never have to set them up yourself. For example, you could use !deepl, !wiki, !wse, !wt, !aw, etc. etc.

(If you do still want to use e.g. Google for search, you can use !g.)

I think this works equivalently in Firefox, but I don't know if there is a mechanism to import from other browsers.

E.g., I use a bookmark of:

  https://caniuse.com/mdn-html_elements_%s
With a keyword set to:

  caniuse
And then type in the URL bar:

  caniuse div
To open:

  https://caniuse.com/mdn-html_elements_div
I'm a bit confused, don't you just navigate to the page and right click the url to add that page to search? It will default to an @baseurl, like @wikipedia. But you can go to settings > search and scroll down and add your own shortcut. Or you can click the cog wheel in the address bar.

Another user mentioned ddg's bang commands, and that's how I name things. But also built in there's "^ " (need the space) for history, "* " for bookmarks, "% " for tabs and "> " (disabled by default?) for actions.

I really don't see how this is meaningfully different from chrome. Aren't you performing the same actions? Or actually less? "navigate to url, right click, add, (optional) click cog, supply additional shortcut(s)"