From mboxrd@z Thu Jan 1 00:00:00 1970 From: ralph@inputplus.co.uk (Ralph Corderoy) Date: Mon, 30 Oct 2017 14:05:28 +0000 Subject: [TUHS] basic tools / Universal Unix In-Reply-To: <20171030025444.16E04156E7D8@mail.bitblocks.com> References: <2962D014-8FF9-4E53-8000-EF49C49817E9@bitblocks.com> <20171030005507.D30C620202@orac.inputplus.co.uk> <20171030025444.16E04156E7D8@mail.bitblocks.com> Message-ID: <20171030140528.42DB1218A6@orac.inputplus.co.uk> 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