[Vimperator] macro.patch

calmar mac at calmar.ws
Mon Dec 10 06:57:40 PST 2007


On Mon, Dec 10, 2007 at 02:04:26PM +0100, Martin Stubenschrott wrote:

> On Mon, Dec 10, 2007 at 05:25:44AM +0100, calmar wrote:
> > Hi all,
> > 
> > http://www.calmar.ws/tmp/macro.patch
> > 
> > it's only halfway working.
> > 
> > e.g. /search .. does not work
> > when :noremap j 2j
> > it qqjq results in a j2j   (j + what it gets replaced with 2j)
> 
> I tried: qq then jjjjjjjjj and stop with q.
> When replaying @q, it works kinda (cool!) but i get a quick
> echoerr("Register 'j' is not set").

yeah, that must be a bug somewhere in this case - it seems it calls the
function again with what feedkeys gets feeded. maybe when doing
what you wrote below, it might help automatically..hmm

> 
> Instead of displaying "recording into register x" the statusline should
> just say "recording" ALL the time while recording. This can be done, by
> moving the isRecording flag from events.js to modes.js, just there are 
> 
>         get passNextKey() { return passNextKey; },
>         set passNextKey(value) { passNextKey = value; this.show(); },
> 
> lines in modes.js. Then in getModeMessage() just checking the flag and
> return "recording".

ok

> 
> > It also seems. with the ARGUMENT. flag on the mappings, it feeds
> > itself.. (while it feeds it calls itself, or someting is not ok at
> > least)
> 
> Hmm, i don't understand it, why couldn't the "q" mapping be done like the "@"
> mapping in this regard? Just check for "q" in the if (isRecording) { ...
> } to stop the macro. This should (hopefully) also work with remapping
> :map a q. when the code for the macro recording is at the right place.

then I need to know how the the macro got started 'q' or whatever
in order to stop it right there.

Now the function get called twice, once it starts (and extracts
the first key (register) itself, the other time it stops (to
whatever q is mapped.

when q has an argument, when q is issues a second time, it again
wants an argument or so?

> > Then there is the need to save a recording or similar.
> 
> Yeah, but we should wait for ~/.vimperatorinfo support or probably

ok

> 
> > and finally, when opening a new site, there must be a wait until it's
> > open...
> 
> Yeah, that's probably the most difficult part, but i'd say we do all
> other things right first, then commit it, and then have an extra patch
> for that.

yeah

cheers
marco

> PS: Just being curious, what were/are you hacking on with that:
> ? dd.patch
> ? grr.patch
> ? hm.diff

old stuff. e.g. the open on :history <tab> <ret>.. things.

-- 
   (o_  It rocks: LINUX + Command-Line-Interface
   //\
   V_/_                     http://www.calmar.ws


More information about the Vimperator mailing list