Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

People go on quite a bit about the bang syntax in DDG, but is this not a functionality that's entirely contained within Chrome's (and many other browsers') search keywords function? When I type 'wik http codes', it takes me directly to the wikipedia page for http codes, and it's built in. Does bang syntax do anything else in addition?


Mainly that you don't need to set them up. I have set up loads of custom searches in Opera (which was the first to have this functionality, years ago), but there are always search engines you hadn't thought of.

Looking at the !bang help page for DDG, I discovered HN Search, for instance, which I did not know of before. Knowing this, I could of course set it up as my own custom search, but `!hn whatever` is easy enough that I haven't felt the need yet. Additionally, dunno if Chrome or FF do this, but in Opera if you select text and right-click it you can search it with a custom search engine. It's in a submenu of the context menu, and it's nice to not have it too cluttered :)

One additional trick with custom searches in the browser, is to key Google's "Feeling Lucky" to `go` (just append `&btnI=yes` to the search URL) and DDG's equivalent feature to `dd` (prepending `!+` to the query, that's a bang and an encoded space btw). Super useful if you know your first hit is going to be what you want anyway. For some reason, Google occasionally gives you the result pages anyway instead of redirecting you, btw. Didn't use to, but they changed something I guess.


In Firefox it is only a matter of right click on a search-form input + click on "Add keyword for this Search...". Couldn't be easier than this. Reading the DDG help on available shortcuts takes me longer. (In Chrome it is harder and they should really copy the Firefox user experience)

Using DDG for such functionalities makes no sense when this particular feature should be a feature of the browser.


"Couldn't be easier than this."

Yes it can. Chrome does it automatically. It also has a better UI to boot.

The way Chrome works is, if you've ever searched a site, typing the first few letters of the site name (say, "go" for google), then hitting tab, will give you the site's search. These are added automatically, as long as you've ever searched a site before.

Advantages of Chrome's way: * They're added automatically. Visiting your family's house? They probably already have the standard Amazon/Wikipedia searches, no setup necessary.

* Once in the mode of searching a website, the text you typed (e.g. "go" for Google) is NOT part of the textbox. This means that when you press "home", you go back to the start of they text you're trying to type. Want to copy paste the query before hitting enter? Much easier with Chrome.

Disadvantages of Chrome: * Very rarely, a search isn't added. I don't bother adding them manually cause they're rare.

* The letters you have to type for a site are the first letters of the URL, not site name. This means Hacker News Search isn't "Ha<tab>", but rather "ne<tab>".


That's only easier if what you're looking for is what Chrome automatically finds. If not, you're going to have to set up a custom search somehow anyway.


I'll go one step further:

I don't even use Chrome's search shortcuts anymore. I just type whatever into the address bar, and Google almost always has what I want in the top 3 results. With keyboard shortcuts, I can launch the correct Google result with my keyboard, and I think it ends up being considerably faster than using a specific search engine keyword. It's also better at times, since some sites (like Wikipedia and some documentation sites) have terrible built-in search functionality.


Exactly:

Ctrl + L -> [wiki] http codes -> Tab -> Enter


For this very purpose (trusting Google in certain searches) my default search engine is Google's Feeling Lucky. If I want regular Google search I use 'g' keyword (I got used to it as it was default in Opera since I can remember). Also, when you mistype or your search is just bad (Did you mean?) the Feeling Lucky won't redirect you.


I guess you guys must be using much simpler searches than me, because Google rarely has what I'm searching for as the top link unless the search is super simple (like a search for "wikipedia" or something).

Google also screws up constantly when it tries to search for what it thinks you meant rather than for what you actually typed. I hate that feature.

And, of course, there's the spyware keystroke monitoring when you type in google's own search form.

All these reasons and more is why I long ago switched to DDG as my primary search engine.

I tried using Scroogle for a while, which at least tries to solve some of the privacy issues with Google. But the search results were just not as high quality as those of DDG.


Yes, this is in Firefox too. I've had `wp %s` bookmark for many years now bound to the wikipedia search page, so I do `wp cat`, etc. etc. The JavaScript example really didn't hit home for me either because I'm always on Freenode, and /msg ecmabot mdn [term] is faster than anything else, especially because I usually have a chat open with ecmabot already.


You should change it to a capital s (%S) for your Wikipedia search bookmark:

http://kb.mozillazine.org/Using_keyword_searches#Creating_bo...


And in Firefox, you can either set it up in the search bar's menu (by going to its preferences), or, if there is no search plugin for a site, go to that site, right click in the search box, and choose "Add Keyword Search". This'll create a bookmark with the same effect.

I've done this for every single site I search regularly, and have used up almost all 26 letters at this point. It's amazingly useful.


Yup, exactly. This is the exact question I had last time I saw a ddg thread here. (Also works with Firefox, Opera, etc)

(And again, the same thing I said last time, the added benefit of using browser shortcuts instead of ddg is that you can map them to intranet results that can't be indexed (by an external search engine))


Perhaps I'm not using the search keywords functionality correctly, but in my experience, it works in one of two ways.

- Start typing 'wiki...' and it will autocomplete to http://en.wikipedia.org In order to search that site, I have to left arrow, space, and then type my query. I found that while usually helpful, the autocomplete was occasionally unpredictable/frustrating enough to me that it negated the times it was helpful. Having fine tuned control w/o autocomplete is preferable to me.

- Using the omnibox to enter 'wiki http codes', which will pull up google results. I then have to tab or otherwise use keyboard shortcuts to select the first link, all of which are a worse user experience than the bang syntax to me.


once you start typing wiki, and the autocomplete comes up, you can press tab, and it will search using the wiki search. you're able to add custom search engines (as pointed out by other users), but chrome also picks up on many of these itself


Yeah, that's because you need to set up a search engine keyword in chrome's preferences. It's under 'Basics'->'Manage Search Engines'. After you do that, all it takes is typing a keyword you've defined into the omnibar, a space, and then your query. Works quite well.


I hate autocomplete features that run on websites. They're basically keylogging spyware.


This way you can use the exact same keywords in every browser. It can be confusing if you use someone else's computer or several browsers on your own machine.


also, in chrome, using google, you just type Ctrl+K, wiki http codes, it shows you the google results, tab and enter.

I love the keyboard functionality google has.


I use the Pentadactyl Firefox extension, which lets me control Firefox from the keyboard (in much the same way as vim), so websites which try to inject their own keyboard shortcuts really get my goat.

DDG does this too. But fortunately, there's an easy way to turn it off in the preferences.

Unfortunately, there's a problem with setting preferences on DDG (or any other websites), as your preference choices can be used to track you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: