forked from Binocular222/Sublime-Text-3-Full-Documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Macro.txt
18 lines (18 loc) · 1.75 KB
/
Macro.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
:Macro:
Call a series of commands
Stored in *.sublime-macro
Show up under Tools | Macros | <PackageName>
Record Macro
Ctrl+q to start recording → execute the action → Ctrl+q again to stop recording
Recorded macro won’t be saved to a file, but kept in the macro buffer
Ctrl+Shift+q to run the recorded macro
Tools | Save macro... to save it to a file
Note that the macro buffer will remember only the latest recorded macro.
Macros only record commands sent to the buffer: window-level commands, such creating a new file, will be ignored.
Example of .sublime-macro:
[
{"command": "move_to", "args": {"to": "hardeol"}},
{"command": "insert", "args": {"characters": "\n"}}
]
Run a macro:
via keyboard shotcut: { "keys": [ctrl+i], "command": "run_macro_file", "args": {"file": "Packages/User/<file name>.sublime-macro"} }