Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text Command Palette for playing macro

Is it possible to play a saved macro using the command palette?

I know that it is possible to assign a keyboard shortcut to a macro but that is another thing to remember and not very feasible when you have more than a few macros.

like image 530
Mustafa Avatar asked Oct 19 '25 14:10

Mustafa


1 Answers

Yes, it is possible. You need to save your macro to a file at ../sublime-text-3/Packages/User/YOUR_MACRO_NAME.sublime-macro. Then add the following code to file ../sublime-text-3/Packages/User/Default.sublime-commands:

[
    {
    "caption": "ADD TEXT TO BE DISPLAYED ON COMMAND PALETTE",
    "command": "run_macro_file",
    "args":
        {
            "file": "res://Packages/User/YOUR_MACRO_NAME.sublime-macro"
        }
    }
]
like image 159
Corleo Avatar answered Oct 22 '25 09:10

Corleo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!