by Devin Yang
(This article was automatically translated.)

Published - 6 years ago ( Updated - 6 years ago )

1. Re-tools=>Record Marco to record. (Control+q to start recording and stop)
2. Save the recorded macro as a file. tools=>Save Marco...
3. Set hotkeys and execute macros.

For example, after recording an operation, it needs to be saved as a hotkey.
{ "keys": [], "command": "run_macro_file", "args": {"file": "Packages/User/.sublime-macro"} }
or
[
{ "keys": ["ctrl+shift+x"], "command": "run_macro_file", "args": {"file": "Packages/User/add comma to end.sublime-macro"} }
]
For example: Below I recorded a section of marco that deletes the function.
In the future, I will save him as df
{ "keys": ["d","f"], "command": "run_macro_file", "args": {"file": "Packages/User/delete_function.sublime-macro"} },
Therefore, if I want to delete the function in the future, I only need to enter df.
 

Tags: sublime

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments