forked from sublime-emacs/sublemacspro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Default.sublime-keymap
191 lines (168 loc) · 7.56 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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
[
{ "keys": ["alt+q"], "command": "wrap_lines" },
{ "keys": ["ctrl+o"], "command": "sbp_open_line" },
// Emacs style
{ "keys": ["ctrl+a"], "command": "move_to", "args": {"to": "bol", "extend": false} },
{ "keys": ["ctrl+e"], "command": "move_to", "args": {"to": "eol", "extend": false} },
{ "keys": ["ctrl+e"], "command": "move_to", "args": {"to": "eol", "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["alt+v"], "command": "move", "args": {"by": "pages", "forward": false} },
{ "keys": ["ctrl+v"], "command": "move", "args": {"by": "pages", "forward": true} },
{ "keys": ["ctrl+b"], "command": "move", "args": {"by": "characters", "forward": false} },
{ "keys": ["ctrl+f"], "command": "move", "args": {"by": "characters", "forward": true} },
{ "keys": ["ctrl+p"], "command": "move", "args": {"by": "lines", "forward": false} },
{ "keys": ["ctrl+n"], "command": "move", "args": {"by": "lines", "forward": true} },
{ "keys": ["alt+b"], "command": "move", "args": {"by": "words", "forward": false}},
{ "keys": ["alt+f"], "command": "move", "args": {"by": "word_ends", "forward": true}},
{ "keys": ["ctrl+h"], "command": "left_delete"},
{ "keys": ["ctrl+shift+h"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete to Hard BOL.sublime-macro"}},
{ "keys": ["ctrl+d"], "command": "right_delete"},
{ "keys": ["alt+d"], "command": "delete_word", "args": { "forward": true } },
{ "keys": ["ctrl+backspace"], "command": "delete_word", "args": { "forward": false } },
{ "keys": ["alt+backspace"], "command": "delete_word", "args": { "forward": false } },
{ "keys": ["super+backspace"], "command": "delete_word", "args": { "forward": false } },
{ "keys": ["ctrl+/"], "command": "undo"},
{ "keys": ["ctrl+shift+/"], "command": "redo"},
{ "keys": ["ctrl+_"], "command": "undo"}, // consistency with the Mac
{ "keys": ["alt+shift+,"], "command": "move_to", "args": {"to": "bof", "extend": false}},
{ "keys": ["alt+shift+."], "command": "move_to", "args": {"to": "eof", "extend": false}},
{ "keys": ["ctrl+l"], "command": "sbp_recenter_in_view" },
{ "keys": ["alt+q"], "command": "sbp_wrap_paragraph"},
{ "keys": ["ctrl+x","h"], "command": "select_all"},
// Kill Ring handling
{ "keys": ["ctrl+k"], "command": "sbp_kill_line"},
{ "keys": ["alt+k"], "command": "sbp_kill_to_end_of_sentence"},
{ "keys": ["ctrl+y"], "command": "paste" },
{ "keys": ["ctrl+shift+y"], "command": "sbp_yank_choice" },
{ "keys": ["ctrl+space"], "command": "sbp_set_mark" },
{ "keys": ["ctrl+w"], "command": "sbp_delete_to_mark" },
{ "keys": ["super+c"], "command": "sbp_kill_ring_save" },
{ "keys": ["alt+w"], "command": "sbp_kill_ring_save" },
{ "keys": ["ctrl+g"], "command": "sbp_cancel_mark" },
{ "keys": ["ctrl+f"], "command": "move", "args": {"by": "characters", "forward": true, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+b"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["alt+b"], "command": "move", "args": {"by": "words", "forward": false, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["alt+f"], "command": "move", "args": {"by": "word_ends", "forward": true, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+n"], "command": "move", "args": {"by": "lines", "forward": true, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+p"], "command": "move", "args": {"by": "lines", "forward": false, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+space"], "command": "sbp_cancel_mark", "context" :
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
// Search and Replace
{ "keys": ["ctrl+r"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse":true} },
{ "keys": ["ctrl+s"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse":false} },
{ "keys": ["alt+r"], "command": "show_panel", "args": {"panel": "replace"} },
{ "keys": ["super+r"], "command": "show_panel", "args": {"panel": "replace"} },
// Goto stuff
{ "keys": ["ctrl+x", "ctrl+f"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["alt+g", "alt+g"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true, "text" : ":"}},
{ "keys": ["ctrl+alt+g"], "command": "show_overlay", "args": {"overlay":"goto", "show_files" : false, "text": "@"}},
{ "keys": ["ctrl+x", "b"], "command": "next_view" },
{ "keys": ["ctrl+x", "ctrl+b"], "command": "goto_open_file"},
{ "keys": ["ctrl+x", "o"], "command": "sbp_cycle_focus_group"},
{
"keys": ["ctrl+x", "2"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells": [[0, 0, 1, 1], [0, 1, 1, 2]]
}
},
{
"keys": ["ctrl+x", "1"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
}
},
{
"keys": ["ctrl+x", "3"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
// { "keys": ["ctrl+1"], "command": "focus_group", "args": { "group": 0 } },
// Completion
{ "keys": ["alt+/"], "command": "auto_complete" },
{ "keys": ["alt+/"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]
},
// Aborter
{ "keys": ["ctrl+g"], "command": "hide_overlay", "context":
[
{ "key": "overlay_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+g"], "command": "hide_auto_complete", "context":
[
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+g"], "command": "hide_panel", "context":
[
{ "key": "panel_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["alt+;"], "command": "toggle_comment" },
// Rectangles
{ "keys": ["ctrl+x", "r", "t"], "command": "sbp_rectangle_insert" },
{ "keys": ["ctrl+x", "r", "d"], "command": "sbp_rectangle_delete" },
// Registers
{ "keys": ["ctrl+x", "r", "s"], "command": "sbp_register_store" },
{ "keys": ["ctrl+x", "r", "i"], "command": "sbp_register_insert" },
// Do it my way
{ "keys": ["ctrl+x", "k"], "command": "close" },
{ "keys": ["ctrl+x", "ctrl+c"], "command": "exit"},
{ "keys": ["ctrl+x", "ctrl+s"], "command": "save"},
// Other Emacs features
{ "keys": ["alt+x", "f", "f", "a", "p"], "command": "sbp_find_file_at_point" },
// Emacs style tabs
{ "keys": ["tab"], "command": "reindent", "context": [
{ "key": "panel_has_focus", "operand": false },
{ "key": "auto_complete_visible", "operand": false },
{ "key": "has_next_field", "operand": false },
{ "key": "overlay_visible", "operand": false }]
}
]