forked from hayaku/hayaku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Default (Linux).sublime-keymap
45 lines (41 loc) · 1.89 KB
/
Default (Linux).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
34
35
36
37
38
39
40
41
42
43
44
45
[
// Main Hayaku context
{
"keys": ["tab"],
"command": "hayaku",
"context": [{"key": "hayaku_css_context"}]
}
// tab в конце строки переводит на новую строку
, {
"keys": ["tab"],
"command": "hayaku_add_line",
"context":[
{ "key": "selector", "operator": "equal", "operand": "source.css" },
{ "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 }
]
}
// Temporary fix for the semicolon inserting (bad bad whitespace after)
, { "keys": [":"], "command": "insert_snippet", "args": {"contents": ":$0"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "source.css - meta.selector.css", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\}|$)", "match_all": true }
]
}
// Temporary inline comment for CSS (would be replaced by a more useful command)
, {
"keys": ["/","/"],
"command": "insert_snippet",
"args": {"contents": "/* ${1} */$0"},
"context": [{ "key": "selector", "operator": "equal", "operand": "source.css -comment.block.css", "match_all": true }]
}
// Command for inserting CSS code block
, {
"keys": ["ctrl+enter"],
"command": "hayaku_add_code_block",
"context": [{"key": "hayaku_add_code_block"}]
}
]