I know about recording with q
into registers, but I was wondering if it's possible to set something up to quickly recall the last recording, in much the same way that .
recalls the last short editing command (see here for a discussion on .
).
I know about @@
but it only seems to work after doing @z
where z
is the register used.
e.g. to make the recording you must type qz
, go on to do your thing, q
, and then in order to run the recording you must @z
before you can start @@
-ing to repeat that.
My hack solution now is a bind nnoremap , @q
which lets me do recordings with qq
and ending them with q
. Is there something better (e.g. something that records into a particular register with a single keystroke, or something that specifically repeats the last-recorded macro)? admittedly that isn't a huge improvement, as it's pretty optimal already.
For me a single register that is easy to use is generally more useful than a large number of registers that require a bit more work to get at. Though this could just be that I'm bad at remembering things and don't see myself effectively making use of more than one.