macros
macros copied to clipboard
How to declare multiple commands/macros
I tried to declare 2 macros command name, but got issues, "command not found"?
maybe like this
"macros": {
"addSemicolonToLineEnd": [
"cursorEnd",
{
"command": "type",
"args": {
"text": ";"
}
}
],
"addCommaToLineEnd": [
"cursorEnd",
{
"command": "type",
"args": {
"text": ","
}
}
],
},
and u call it like
{
"key": ";",
"command": "macros.addSemicolonToLineEnd",
"when": "editorTextFocus && editorLangId == 'php'"
},
{
"key": ",",
"command": "macros.addCommaToLineEnd",
"when": "editorTextFocus && editorLangId == 'json'"
},