[Vimperator] v0.4 search engines integration problems
Pierre Andrews
mortimer.pa at free.fr
Fri May 4 04:25:43 PDT 2007
Hello,
there seems to be some bugs with how vimperator 0.4 integrates with
the firefox search engines. A problem has already been mentioned
earlier. Here are two obvervations I've made:
The keyword for the search provided by vimperator is only the first
"word" of the search engine name. This result in "wikipedia english"
and "wikipedia french" in havint the same "wikipedia" keywords. I also
have a "flickr groups" and "flickr photos" that both have a "flickr"
search keyworkd because of that. It's also a bit strange with other
engines, like for example "le conjugueur" has the keyword "le" which
is only an article ("the") so has not much meanings.
A temporary solution to that is to go in your profile folder in the
searchplugins subfolder and edit the search engine files to change the
engine names.
Probably here, a fix would be to replace the non word characters with
a '_', line 165 of bookmarks.js, something like:
var alias = firefox_engines[i].name.replace(/\W+/g,
"_").toLowerCase();
Another solution would be to define the search engines with the
"keyword on bookmarks", but that doesn't seem to be supported by
vimperator yet.
The second, very annoying problem I have found, is that if I type:
:open google.com/ig
or
:open flickr.com/photos/me
instead of opening the web site, it opens the search engine for a
search (respectively) for ".com/ig" and ".com/photos/me". Shouldn't
vimperator wait for a space there?
I think that this problem comes from line 1316 of commands.js The
regexp should probably be (not tested):
var matches = urls[url].match(/^\s*(\w+)(\s+(.*)|$)/);
the second \s takes a + so that we get at least 1 space after the
engine name, or we are at the end (I am not sure javascript works with
this kind of regexp, but that's the idea I suppose)
Pierre
--
Pierre Andrews
Ph.D. Student, The University of York
Ing.info.dipl. EPFL
pierre.andrews at a3.epfl.ch
http://www.cs.york.ac.uk/~pandrews
More information about the Vimperator
mailing list