vicoapp / vico

Mac Programmers Text Editor
http://www.vicoapp.com/
657 stars 89 forks source link

Add macro recording with q<register>/q. #14

Closed Shadowfiend closed 11 years ago

Shadowfiend commented 12 years ago

A few things had to be done for this:

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.

martinh commented 12 years ago

Cool stuff. If the macro state moved to ViParser, I think we can manage recording macros over multiple documents and multiple views of the same document. As it is now, you can't start a macro in one document and end it in another.

Shadowfiend commented 12 years ago

Aha! Fair point. I'll work on that later today and update the PR.

Shadowfiend commented 12 years ago

Ok, finally got around to toying with this. I'm confused about one thing though: given that the key manager that is currently recording the macro is stored in a static global variable, why wouldn't it record over multiple documents and views?

Shadowfiend commented 11 years ago

This should now be in master since I merged my merged branch in.