vicoapp/vico — pull request #14 by Shadowfiend (2012-07-11 22:36:24+00:00)
Title: Add macro recording with q<register>/q.

A few things had to be done for this:
- A new map flag, ViMapNoArgumentOnToggle, intended to be used in conjunction
with ViMapNeedArgument. This makes it so that every other invocation of the
given mapping acts as if ViMapNeedArgument is unset.
- Some additional variables to keep track of the last toggle command (for the
above to work) and the ViKeyManager that is currently recording a macro (so
it can get key codes from all key managers; this lets the macro record, for
example, commands from the command key manager when macro recording is
invoked from normal mode).

There are some issues with more complex macros, and I'm not sure if those are
issues with the macro recording itself (the register seems to contain the
key strokes) or if it's an issue with replaying macros that are a little more
complicated.

I'm also not sure this is necessarily the best way to implement it. Definitely
looking for some feedback on that front.