On Tue, Nov 18, 2014 at 09:53:19PM -0500, random832_AT_fastmail.us wrote:
> On Tue, Nov 18, 2014, at 17:59, Stephen Paul Weber wrote:
> > I've written up patches to make it so that I, a, A, s, ce, etc can be
> > repeated properly with . -- not sure if I'm doing this the Right Way,
> > but
> > it seems to work in my tests. Feedback appreciated. Patches attached.
Thanks for your patches! The reason why action_prev was only overwritten
in vis_mode_insert_input is that entering insert mode and then leaving
it without having made a change, should keep the . command working.
The whole repeating implementation probably needs a overhaul. A redesign
should also consider howto implement macro support. Then the . command
would simply replay a short macro. I will have to give it some more
thought but unfortunately I don't have the time right now ...
> Haven't looked at your patch, but vim stores the inserted keystrokes
> (not text - it'll happily let you repeat an inserted sequence of
> backspaces that deleted over the beginning of the insertion region,
> arrows that moved the cursor, etc) in a read-only register named with
> the period character. Pasting it with ^R. or ^A in insert-mode plays
> back the keystrokes and adds them to the text which will be in the
> register the next time you leave insert mode. I don't know offhand if
> this register is used for the . command or not.
Yes this also needs to be taken into account. Keeping track of the
keystrokes makes the implementation somewhat uglier/harder but is probably
necessary to provide certain features.
--
Marc André Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0
Received on Thu Nov 20 2014 - 13:02:47 CET