From mboxrd@z Thu Jan 1 00:00:00 1970 From: ralph@inputplus.co.uk (Ralph Corderoy) Date: Mon, 30 Oct 2017 00:55:07 +0000 Subject: [TUHS] basic tools / Universal Unix In-Reply-To: <2962D014-8FF9-4E53-8000-EF49C49817E9@bitblocks.com> References: <2962D014-8FF9-4E53-8000-EF49C49817E9@bitblocks.com> Message-ID: <20171030005507.D30C620202@orac.inputplus.co.uk> Hi Bakul, Regarding vi: > As an example, you can map a key to do a sequence of operations but > you you can’t then use it in conjunction with search to repeat them > over a range of lines. You can use tail recursion in the macro because a failed search causes it to stop. So `qqq' to start recording to register `q', and then instantly stop recording, clearing it. Then the real definition, ending in an execution of the empty `q'. qq/4$^Ma2^[@qq And finally an `@q' to kick off the recursion. -- Cheers, Ralph. https://plus.google.com/+RalphCorderoy