[TUHS] basic tools / Universal Unix

Ralph Corderoy ralph at inputplus.co.uk
Tue Oct 31 00:05:28 AEST 2017


Hi Bakul,

> Thanks, didn't know about q.  However, nvi doesn't have q.

It's just a means of recording typing into a register.  Exactly the same
can be achieved by typing into the buffer and then yanking into the
named register, being careful to leave off the LF at the end of the line
if it's not wanted, e.g. «"qy$».

> What I was getting at is being able to define commands that can take
> one or two arguments like the bulitins, separate from any key mapping.

If `3wy' yanked three words then the macro in register `q' could start
with `y' allowing `3w at q' to pass a region to the macro, but it doesn't.
:-)  I think one's left with setting a mark, or using automatic ones set
at various times by vim, and the macro using those to know its region.

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy



More information about the TUHS mailing list