[Vimperator] [patch] Quick Find patch

Nigel McNie nigel at mcnie.name
Tue May 1 05:18:30 PDT 2007


Hi,

Attached is a first draft of a patch I've been working on for implementing a
finder for vimperator using /, n and N instead of the standard firefox
quicksearch.

PLEASE NOTE: This is a FIRST DRAFT.

The APIs need discussion, behaviour needs to be fixed, backwards searching
with ? needs implementing and there are bugs. But it is enough to be getting
some feedback on.

Also included is the start on an 'event API'. This allows things to
subscribe to events that can be fired by vimperator when certain things
happen. For example, the search plugin is now listening to text being typed
in the command bar when search mode is on, so after each keypress it can
perform an incremental search. And when enter or escape is pressed, the
search knows to complete or cancel the search as appropriate.

Also, the openVimperatorBar function is going to need to change to
accomodate different prompts other than just : (for example /, ? and even '>
' for heredoc). I have included a function, newOpenVimperatorBar, that
allows the prompt to be specified separately and makes the job of getting
the command line value a lot easier (no need to worry about : at the start
anymore). I plan to replace the old openVimperatorBar function with this one
next, fixing up all the special case code for the ':' prompt while doing
that.

The use of this function means that if you do a quicksearch for something
that matches a vim command, the command will also be run (e.g. searching for
'a' will run ':addons'). This is, of course, a bug. But will be fixed when
the prompt is dealt with.

-- 
Regards,
Nigel McNie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mozdev.org/pipermail/vimperator/attachments/20070502/28842df8/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: find.tar.gz
Type: application/x-gzip
Size: 7268 bytes
Desc: not available
Url : http://www.mozdev.org/pipermail/vimperator/attachments/20070502/28842df8/attachment.bin 


More information about the Vimperator mailing list