-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDefault.sublime-keymap
executable file
·33 lines (33 loc) · 1.67 KB
/
Default.sublime-keymap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[
// Auto-pair art delimiters
// <% %>
{ "keys": ["%"], "command": "insert_snippet", "args": {"contents": "%${0: }%>"}, "context":
[
{ "key": "selector", "operand": "text.art.percentsign - source.js", "match_all": true },
{ "key": "setting.auto_match_enabled", "operand": true },
{ "key": "selection_empty", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<$", "match_all": true },
{ "key": "following_text", "operator": "not_regex_contains", "operand": "^[%=_#>-]", "match_all": true }
]
},
// Auto-indent
// <% %>
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
[
{ "key": "selector", "operand": "text.art.percentsign - source.js", "match_all": true },
{ "key": "setting.auto_indent", "operand": true },
{ "key": "selection_empty", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<%(?!%)[=_#-]?\\s*$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^[_-]?%>", "match_all": true }
]
},
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
[
{ "key": "selector", "operand": "text.art.percentsign punctuation.definition.js.end.art", "match_all": true },
{ "key": "setting.auto_indent", "operand": true },
{ "key": "selection_empty", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<%(?!%)[=_#-]?\\s*$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\s*[_-]?%>", "match_all": true }
]
}
]