Sublime Forum

How to run multiple UNDO commands at a time

#1

Hitting CTRL+Z runs the undo command once. Is there a way to set a keyboard shortcut like CTRL+SHIFT+Z to run the undo command 10X in sublime text?

I know I can script this in an external program but I’m just wondering if this is a feature in ST and I am missing it.

Thanks!

0 Likes

#2

This will do that:

    {
        "keys": ["ctrl+shift+z"], "command": "chain", "args": {
            "commands": [
                ["undo"], ["undo"], ["undo"], ["undo"], ["undo"],
                ["undo"], ["undo"], ["undo"], ["undo"], ["undo"],
            ]
        },
    },

It requires that you be running a 4k build of Sublime (check Help > About for your build number if you’re not sure). If you’re not, then you can install the Chain of Command package.

1 Like

#3

That works very well and I also did the redo the same way. Thank you!

1 Like