Hello everyone. Until the previous version of sublime text, when you pressed enter into a couple of braces the editor inserted an indented line … In the latest version the editor stops to do that and this feature is essential for me. I would like to know how I can reverse this.
Thank you.
Not inserting indented line between braces when pressing enter
dariorodt
#1
0 Likes
kingkeith
#2
ST still does this in build 3144 - perhaps you have something overriding the keybinding (for example maybe a package upgrade/install with co-incidental timing) or the auto_indent setting has been turned off?
if it’s the former, you can copy the original binding from the Default keybindings file into your User keymap file:
{ "keys": ["enter"], "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