-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Undo of complete macro (not just last action) #48
Comments
the ext simply runs commands in sequence, it doesnt add any extra side operations to track the changes made. what u need is something like full undo or undo all similar to https://github.com/shagabutdinov/sublime-full-undo |
Not exactly. That plugin seems to undo every change in the file, not just the changes in the last executed macro. What I'm looking for is something like: "commentDown": [
"START_UNDO_CONTEXT", // <<<<<<<<<<<<<<<<<<<<<<<<
"editor.action.addCommentLine",
"editor.action.copyLinesDownAction",
"editor.action.removeCommentLine"
"END_UNDO_CONTEXT", // <<<<<<<<<<<<<<<<<<<<<<<<
] So, if I press Ctrl+Z, the complete macro in undone (but no more). Thanks |
mmmm, maybe create another custom command like #13 where u put a command u want to run and the one you want to execute accordingly ex.
so now when u execute |
It could be, but I think it would be more usable if you could somehow use Ctrl+z instead of a new command. I'd like that, when I want to undo a keybinding effect, native commands and macros behave the same way (when using Ctrl+Z) Sorry. English it's not my native language. Thanks |
@ctf0 Your fork works great, however i can't raise issues on your repo |
@tberghuis i didn't notice it was off, done |
There is no difference. Ctrl+z behaves the same way: only last action is undone (not the whole macro). Thanks |
the ctrl+z wont work as u expect because macros are not a native command, what u need is to create another command that counter the effect of the ran macro ex.https://github.com/ctf0/macros#new |
Ok. Just to confirm: so for EVERY macro It would be awesome that vs code would allow to interact with the undo manager to insert some form of composite action (composed by all the macro actions) and then it could handle this situation automatically for us. Thanks for your work. |
correct |
The extension is GREAT. But when using Undo (Ctrl+Z), I'd like to be able to undo all the actions of the macro; not just the last one.
For example, in this macro, only "editor.action.removeCommentLine" is undone.
To Undo a macro, I have to type "Ctrl+Z" as many times as editor actions it has.
Thanks
The text was updated successfully, but these errors were encountered: