Skip to content

Commit a644c0e

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 67d86e6 commit a644c0e

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
@@ -53,7 +53,7 @@
5353
},
5454

5555
// Add indented line in square brackets
56-
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
56+
{ "keys": ["enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
5757
[
5858
{ "key": "setting.auto_indent" },
5959
{ "key": "selection_empty", "match_all": true },
@@ -62,7 +62,7 @@
6262
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
6363
]
6464
},
65-
{ "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
65+
{ "keys": ["keypad_enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
6666
[
6767
{ "key": "setting.auto_indent" },
6868
{ "key": "selection_empty", "match_all": true },

0 commit comments

Comments
 (0)