-
Notifications
You must be signed in to change notification settings - Fork 43
/
Default (Windows).sublime-keymap
137 lines (124 loc) · 4.62 KB
/
Default (Windows).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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
[
// Main Hayaku context
{
"keys": ["tab"],
"command": "hayaku",
"context": [{"key": "hayaku_css_context"}]
}
// tab or enter at the end of a line should jump to a correct line
, {
"keys": ["tab"],
"command": "hayaku_add_line",
"context": [
{"key": "hayaku_add_line"},
{"key": "hayaku_at_css"},
{"key": "hayaku_single_caret"}
]
}
, {
"keys": ["enter"],
"command": "hayaku_add_line",
"context": [
{"key": "auto_complete_visible", "operand": false},
{"key": "hayaku_add_line"},
{"key": "hayaku_at_css"},
{"key": "hayaku_single_caret"}
]
}
// 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": "hayaku_at_css" },
{ "key": "hayaku_single_caret" },
{ "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 -punctuation.section.function.css -string.quoted", "match_all": true },
{ "key": "setting.hayaku_CSS_disable_inline_comment", "operator": "not_equal", "operand": true }
]
}
// Command for inserting CSS code block
, {
"keys": ["ctrl+enter"],
"command": "hayaku_add_code_block",
"context": [
{"key": "hayaku_add_code_block"},
{"key": "hayaku_at_css"},
{"key": "hayaku_single_caret"}
]
}
// Command for inserting right indent for code block by enter in braces
, {
"keys": ["enter"],
"command": "hayaku_expand_code_block",
"context": [
{"key": "hayaku_at_css"},
{"key": "hayaku_single_caret"},
{"key": "preceding_text", "operator": "regex_match", "operand": ".*\\{$" },
{"key": "following_text", "operator": "regex_match", "operand": "^\\}" }
]
},
// Commands to jump out of multiple selections in CSS
{
"keys": ["up"],
"command": "clear_fields",
"context": [
{"key": "has_next_field", "operator": "equal", "operand": true},
{"key": "hayaku_at_css"},
{"key": "hayaku_going_up"}
]
},
{
"keys": ["down"],
"command": "clear_fields",
"context": [
{"key": "has_next_field", "operator": "equal", "operand": true},
{"key": "hayaku_at_css"},
{"key": "hayaku_going_down"}
]
},
// Cycling values
{
"keys": ["alt+up"],
"command": "hayaku_cycling_through_values",
"args": {"modifier": 1},
"context": [{"key": "setting.hayaku_use_default_cycling_keymaps", "operator": "equal", "operand": true }]
},
{
"keys": ["alt+down"],
"command": "hayaku_cycling_through_values",
"args": {"modifier": -1},
"context": [{"key": "setting.hayaku_use_default_cycling_keymaps", "operator": "equal", "operand": true }]
},
{
"keys": ["alt+super+up"],
"command": "hayaku_cycling_through_values",
"args": {"modifier": 0.1},
"context": [{"key": "setting.hayaku_use_default_cycling_keymaps", "operator": "equal", "operand": true }]
},
{
"keys": ["alt+super+down"],
"command": "hayaku_cycling_through_values",
"args": {"modifier": -0.1},
"context": [{"key": "setting.hayaku_use_default_cycling_keymaps", "operator": "equal", "operand": true }]
},
{
"keys": ["alt+shift+up"],
"command": "hayaku_cycling_through_values",
"args": {"modifier": 10},
"context": [{"key": "setting.hayaku_use_default_cycling_keymaps", "operator": "equal", "operand": true }]
},
{
"keys": ["alt+shift+down"],
"command": "hayaku_cycling_through_values",
"args": {"modifier": -10},
"context": [{"key": "setting.hayaku_use_default_cycling_keymaps", "operator": "equal", "operand": true }]
}
]