Skip to content

Commit 1a1c9cc

Browse files
committed
[JavaScript] Tweak enter key binding
This commit changes `enter` key binding to "Add Line in Braces" macro, as it indents line between backticks using indentation rules instead of forcing it to be indented via `\t`. This works also, if indentation rules decide not to indent backticked contents.
1 parent c6b6fc2 commit 1a1c9cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

JavaScript/Default.sublime-keymap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535

3636
// Add indented line in backticks
37-
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
37+
{ "keys": ["enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
3838
[
3939
{ "key": "setting.auto_indent" },
4040
{ "key": "selection_empty", "match_all": true },
@@ -43,7 +43,7 @@
4343
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
4444
]
4545
},
46-
{ "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
46+
{ "keys": ["keypad_enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
4747
[
4848
{ "key": "setting.auto_indent" },
4949
{ "key": "selection_empty", "match_all": true },

0 commit comments

Comments
 (0)