ImprovedMacros
No description provided
Details
Installs
- Total 1K
- Win 723
- Mac 236
- Linux 259
| Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | Sep 19 | Sep 18 | Sep 17 | Sep 16 | Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 3 | 0 | 0 | 0 | 0 | 3 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
ImprovedMacros
This plugin is incomplete. Macro recording, which is the general goal of this plugin, is not yet complete. However, the ability to manually define macros via a file or as a key binding argument is functional.
Installation
Note it may be necessary to restart the editor after installing the plugin.
Package Control
Installation through package control is recommended. It will handle updating your packages as they become available. To install, do the following.
- In the Command Palette, enter
Package Control: Install Package - Search for
ImprovedMacrosto see install the plugin.
Manual
Clone or copy this repository into the packages directory. By default, the Package directory is located at:
- OS X: ~/Library/Application Support/Sublime Text 2/Packages/
- Windows: %APPDATA%/Roaming/Sublime Text 2/Packages/
- Linux: ~/.config/sublime-text-2/Packages/
or
- OS X: ~/Library/Application Support/Sublime Text 3/Packages/
- Windows: %APPDATA%/Roaming/Sublime Text 3/Packages/
- Linux: ~/.config/sublime-text-3/Packages/
Usage
Macros can be define as part of a key binding, or in a file. The content of args for a key binding will match what is defined in a file.
Commands
Below are the commands currently exposed.
run_multiple_commands- This command will run multiple commands, where the macro is specified within the key binding itself.- The top level argument for this command is
commands. It contains a list of entries, as defined in “Defining a macro”
- The top level argument for this command is
run_multiple_commands_from_file- This command will run multiple commands, where the macro is defined in a file.
Defining a macro
context- This is the context to run a command. Valid entries for this areview,window, andapp. If no context entry is specified,viewwill be used as the default.command- The name of the command to run. This is the same command that would appear if one were to log the commands usingsublime.log_commands(True)in the ST console.args- The arguments for the command.delay- A delay (in milliseconds) before running the current command.
Sample usage
Below is an example of run_multiple_commands
{
"keys": ["f12"], "command": "run_multiple_commands",
"args": {
"commands": [{
"context": "window",
"command": "next_view"
},{
"context": "view",
"command": "insert",
"args": {
"characters": "qwerty"
},
"delay": 1000
}]
}
}
Below is an example of run_multiple_commands_from_file. First is a key binding entry. Note that file name can either be Packages/<package name>/<macro name> or an absolute path.
{
"keys": ["f11"], "command": "run_multiple_commands_from_file",
"args": {
"file_name": "Packages/User/test.macro"
}
}
Below is the content of test.macro
[{
"context": "window",
"command": "next_view"
}, {
"context": "view",
"command": "insert",
"args": {
"characters": "qwerty"
},
"delay": 1000
}]
Notes
Thank you to sashabe and nilium from the ST forum.