Sublime Forum

Add Line in Braces

#1

The Add line in Braces macro does not work on the enter key, and if you reassign to another key it will work as in this example

[
{ “keys”: [“ctrl+p”], “command”: “run_macro_file”, “args”: {“file”: “res://Packages/Default/Add Line in Braces.sublime-macro”}, “context”:
[
{ “key”: “setting.auto_indent”, “operator”: “equal”, “operand”: true },
{ “key”: “selection_empty”, “operator”: “equal”, “operand”: true, “match_all”: true },
{ “key”: “preceding_text”, “operator”: “regex_contains”, “operand”: “\{$”, “match_all”: true },
{ “key”: “following_text”, “operator”: “regex_contains”, “operand”: “^\}”, “match_all”: true }
]
},
]

0 Likes