Search the Web, vi Style

By: Rob Reilly
Tuesday, September 5, 2006 10:43:18 AM EST
URL: http://www.linuxplanet.com/linuxplanet/reviews/6306/1/

In the Beginning...

Lunch started out innocently enough for Snap.com colleagues Brad Haugaard, Joe Chen, Ken Yeh. While discussing Snap's very visually oriented search engine, they collectively wondered, "What about people who don't really care about pictures?"

Somebody said, "How about 'visearch'? We could combine a vi editor with a search engine."

The three mused that you could move up and down with the "j" and "k" keys. You might also delete bad listings with "dd" or insert comments into the listing with an "i".

With suggestions from Haugaard and Yeh, Chen programmed a working system over the next few weeks. Chen and Yeh are both software engineers, while Haugaard is a customer service manager.

What started out as a joke was thus born visearch.

Why a Keyboard Operated Search Engine?

"Speed," said Haugaard in a recent interview. "One of the things I noticed after using visearch and then switching over to Google was that I was subconsciously using the visearch commands and being frustrated that they don't work on Google. You can't navigate up and down the listings with 'j' and 'k,' and you can't delete bad listings with 'dd.' You have to take your hands off the keyboard and fiddle with the mouse," he continued.

"I think the mouse is an amazing invention, but for someone who is good at the keyboard, like a vi user, it can be a big time waster," he said.

Written mostly in Javascript, visearch also uses PHP to handle a few functions, like saving searches. The code is not currently available for download. In the future Haugaard said that they could easily plug in other search feeds and allow users to navigate through their results using visearch. He also said that they could possibly support searching/filtering through blogs or news articles.

"visearch is an ad hoc project taking place at Snap.com. We just did it in our spare time and then showed our CEO, Tom McGovern, who really liked it. I want to emphasize that it certainly does not indicate any change of direction for the company as a whole," Haugaard said.

Haugaard also said, "As long as we get our work done, Snap allows us to be creative. Big.com (a search engine for low-vision people) was also kind of an ad hoc project; it was initially created over a weekend by Bill Gross (the head of Idealab, which founded Snap.com) together with a programmer."

Giving visearch a Try

Trying out visearch is easy.

Go to the Web site, hit the Tab key and just enter your search terms (see Figure 1). As you would expect, "j" moves you down the page, one listing at a time. "k" move you up, while "/" lets you search through your results listing. "esc" takes you back to keyboard command mode. Moving to a listing entry and then typing the "enter" key takes you to the selected Web page.

You can also save results, which are persistent as you move back and forth through other Web sites, within Firefox.

You can use the mouse to point to the search box or select items in the results list. If you mouse click on the :help text (in the upper right corner), you'll even get a split screen with basic commands and information. Make sure to click the :quit text (upper-left corner of the help window) to close it. Don't use the little "x" close box above the help window, otherwise Firefox will close.

Overall, the interface is just like using vi in an xterm, except that it works within the browser.

Out In The Future

When asked about future business directions Haugaard commented that they really hadn't reached that stage yet. He thought that mouse-less navigation might someday be applicable to the Snap.com search engine.

"At this point we just want to see what kind of acceptance it gets and to listen to our users and see what thoughts they have about it," he said.

Some of the other ideas Haugaard and his associates are thinking about include:

  • An option to let the user change the text to be black on a white background.
  • Allow users to be able to share their saved searches with others.
  • Offer some support for using regular expressions to let users do filtering.
  • A :mail feature that lets you send a link to a visearch results page, either edited or unedited.

Go try visearch and see if it makes your Web searching easier. Then be sure to let Haugaard and his colleagues know what you think. It looks like an interesting twist that could be very useful to keyboard savvy users.

Rob Reilly is a consultant, trend spotter, and writer. He is a contributing editor for Linux Today. He advises clients on mobile business computing and presentation technology integration. You can visit his web page at http://home.earthlink.net/~robreilly.

Copyright Jupitermedia Corp. All Rights Reserved.