In comp.editors, alb <firstname.lastname@example.org> wrote:
> Hi everyone,
> I'm having serious issues with macros, nearly every time I record one I get
> something upsidedown and I'm left with a bunch of scrambled text, left in insert
> mode, frustrated since the job is not done and angry because there must have
> been something I haven't quite understood in the macro recording.
Do you record with q? Something else?
I have never had an issue recording with q, but care must be taken to
make sure that the macro either starts or ends by setting up a known
good state. I usually use "ends" for recursive macros, and "starts" for
For "known good state", I do things like make sure the cursor is at the
start or end of a word or line with movements like 0, ^, $, B, E
sometimes combined with character searches like fx, Fx, tx, Tx (for
Eg: Make sure the state is cursor after first comma on a line:
also composes macros by hand