[Vimperator] macro.patch
Martin Stubenschrott
stubenschrott at gmx.net
Mon Dec 10 05:04:26 PST 2007
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").
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".
> 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 there is the need to save a recording or similar.
Yeah, but we should wait for ~/.vimperatorinfo support or probably
better save all these things in the sqlite database, what do we have it
for? And .vimperatorinfo isn't meant to be user edited anyway as it's
overwritten.
> the macros are available over e.g.
> vimperator.events.recordResultReg("q")
I am not happy with that name as well, but we can change that later.
> 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.
> cheers
> marco
cheers and thanks for the good work!
Martin
PS: Just being curious, what were/are you hacking on with that:
? dd.patch
? grr.patch
? hm.diff
More information about the Vimperator
mailing list