-
Notifications
You must be signed in to change notification settings - Fork 0
/
Default (Windows).sublime-keymap
707 lines (696 loc) · 24 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
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
[
//2017年8月31日09:07:07添加高亮单次快捷键
{ "keys": ["ctrl+alt+h"], "command": "highlight_words" },
{ "keys": ["ctrl+alt+u"], "command": "unhighlight_words" },
//2017年3月13日19:43:24 sublime插入时间节点
// { "keys": ["ctrl+alt+t"], "command": "time_stamp" },
{"keys": ["ctrl+shift+f5"], "command": "add_date_time_stamp" },
// s2017年1月26日17:22:16 自定义快捷键
{"keys":["alt+ctrl+shift+i"], "command": "reindent"},
//sublime macro 宏记录快捷键,原来ctrl+q被hayaku占据
{ "keys": ["alt+ctrl+q"], "command": "toggle_record_macro" },
// 保存的宏文件设置快捷键
// {"keys": ["alt+enter"],"command": "run_macro_file", "args": {"file": "Packages/User/macro.sublime-macro"}},
// 2017年1月26日11:36:57 hayaku激发快捷键,和ctrl+e是emmet的激发快捷键一样
{"keys": ["ctrl+q"], "command": "hayaku"},
// 2017年1月26日10:34:19
{ "keys": ["alt+shift+p"], "command": "switch_file_deluxe", "args": {"extensions": [".cpp", ".cxx", ".cc", ".c", "Qt.cpp", "Qt.h", ".hpp", ".hxx", ".h", "_p.h", "_p_p.h", ".ipp", ".inl", ".m", ".mm"]} },
// 2017年1月24日19:12:56 plaintasks 新建任务文档快捷键绑定
{"keys": ["ctrl+shift+i"], "command": "plain_tasks_new_task_doc"},
// { "keys": ["alt+o"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm","html","php"]} },
// { "keys": ["alt+shift+o"], "command": "plain_tasks_open_link","context": [{ "key": "selector", "operator": "equal", "operand": "text.todo" }] },
//2017年1月24日14:25:00
//find key conflicts的命令,设置快捷键。在console输入
{"keys": ["alt+ctrl+shift+p"], "command": "find_key_mappings"},
//跳转到鼠标历史位置
{ "keys": ["alt+-"], "command": "jump_back" },
{ "keys": ["alt+="], "command": "jump_forward" },
// 插件expand region 扩选到函数区域快捷键设置
{ "keys": ["super+ctrl+m"], "command": "expand_region" },
{
"keys": ["super+ctrl+shift+u"],
"command": "expand_region",
"args": {"undo": true},
"context": [{ "key": "expand_region_soft_undo" }]
},
//复制为带格式的代码粘贴到onenote或者word中
{ "keys": ["alt+super+c"],
"command": "sublime_highlight",
"args": { "target": "clipboard",
"output_type": "html"
}},
//emmet快捷键修改 取消快捷键方法在preference->pakages setting->emmet->User Settings 设置快捷键
//
// {
// "disabled_keymap_actions": "all"
// }
//移除标签,把ctrl+shift+;改成减号,表示移除
{
"keys": [
"shift+ctrl+-"
],
"args": {
"action": "remove_tag"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.remove_tag"
}
]
},
//输入实时预览expand状态
{
"keys": [
"ctrl+alt+enter"
],
"command": "expand_as_you_type",
"context": [
{
"operand": false,
"operator": "equal",
"match_all": true,
"key": "setting.is_widget"
},
{
"match_all": true,
"key": "emmet_action_enabled.expand_as_you_type"
}
]
},
//在外一层动态输入标签,比ctrl+alt+enter多一层,自动包括当前层
{
"keys": [
"shift+ctrl+g"
],
"command": "wrap_as_you_type",
"context": [
{
"operand": false,
"operator": "equal",
"match_all": true,
"key": "setting.is_widget"
},
{
"match_all": true,
"key": "emmet_action_enabled.wrap_as_you_type"
}
]
},
//在setting里面设置此功能无效,方便select quoed插件的快捷键ctrl+‘生效。
// {
// "keys": [
// "ctrl+'"
// ],
// "args": {
// "action": "encode_decode_data_url"
// },
// "command": "run_emmet_action",
// "context": [
// {
// "key": "emmet_action_enabled.encode_decode_data_url"
// }
// ]
// },
//临时计算
{
"keys": [
"shift+ctrl+y"
],
"args": {
"action": "evaluate_math_expression"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.evaluate_math_expression"
}
]
},
//这里原来是ctrl+shift+0,修改为ctrl+shift+.向内缩选和ctrl+,向外扩选等于英文输入状态下ctrl+shift+space对应
{
"keys": [
"ctrl+shift+."
],
"args": {
"action": "balance_inward"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.balance_inward"
}
]
},
// 向外扩选,原来是ctrl+, 加上shift表示加的意思
{
"keys": [
"ctrl+shift+,"
],
"args": {
"action": "balance_outward"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.balance_outward"
}
]
},
// 和上面对称,去掉shift键
{
"keys": [
"ctrl+."
],
"args": {
"action": "select_next_item"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.select_next_item"
}
]
},
//原来是ctrl+shift+r快捷键,和默认快捷键冲突。这里是同步css的值,特别是在不同前缀的兼容性值
/**
div {
-webkit-transform: rotate(930deg);
-moz-transform: rotate(930deg);
-ms-transform: rotate(930deg);
-o-transform: rotate(930deg);
transform: rotate(930deg);
}
*/
{
"keys": [
"alt+shift+ctrl+r"
],
"args": {
"action": "reflect_css_value"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.reflect_css_value"
}
]
},
//选择之前的项目,去掉shift
{
"keys": [
"ctrl+,"
],
"args": {
"action": "select_previous_item"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.select_previous_item"
}
]
},
{
"keys": [
"ctrl+u"
],
"args": {
"action": "update_image_size"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.update_image_size"
}
]
},
//闭合标签切换成非闭合标签
//<li></li> 切换成
//</li>
//没什么用,在emmet里面设置禁用此功能
{
"keys": [
"shift+ctrl+`"
],
"args": {
"action": "split_join_tag"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.split_join_tag"
}
]
},
{
"keys": [
"shift+ctrl+'"
],
"command": "rename_tag",
"context": [
{
"key": "emmet_action_enabled.rename_tag"
}
]
},
{
"keys": [
"alt+up"
],
"args": {
"action": "increment_number_by_01"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.increment_number_by_01"
}
]
},
{
"keys": [
"ctrl+shift+u"
],
"command": "update_as_you_type",
"context": [
{
"operand": false,
"operator": "equal",
"match_all": true,
"key": "setting.is_widget"
},
{
"match_all": true,
"key": "emmet_action_enabled.update_as_you_type"
}
]
},
{
"keys": [
"ctrl+alt+j"
],
"args": {
"action": "matching_pair"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.matching_pair"
}
]
},
{
"keys": [
"ctrl+down"
],
"args": {
"action": "decrement_number_by_1"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.decrement_number_by_1"
}
]
},
{
"keys": [
"ctrl+e"
],
"args": {
"action": "expand_abbreviation"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.expand_abbreviation"
}
]
},
{
"keys": [
"tab"
],
"command": "expand_abbreviation_by_tab",
"context": [
{
"operand": "source.css, source.sass, source.less, source.scss, source.stylus, source.postcss, source.jade, text.jade, text.slim, text.xml, text.html - source, text.haml, text.scala.html, source string",
"operator": "equal",
"match_all": true,
"key": "selector"
},
{
"operand": "storage.type.templatetag.django",
"operator": "not_equal",
"match_all": true,
"key": "selector"
},
{
"match_all": true,
"key": "selection_empty"
},
{
"operator": "equal",
"operand": false,
"match_all": true,
"key": "has_next_field"
},
{
"operator": "equal",
"operand": false,
"match_all": true,
"key": "setting.disable_tab_abbreviations"
},
{
"operand": false,
"operator": "equal",
"match_all": true,
"key": "auto_complete_visible"
},
{
"match_all": true,
"key": "is_abbreviation"
}
]
},
{
"keys": [
"tab"
],
"command": "expand_abbreviation_by_tab",
"context": [
{
"operand": "source.css, source.sass, source.less, source.scss, source.stylus, source.postcss, source.jade, text.jade, text.slim, text.xml, text.html - source, text.haml, text.scala.html, source string",
"operator": "equal",
"match_all": true,
"key": "selector"
},
{
"operand": "storage.type.templatetag.django",
"operator": "not_equal",
"match_all": true,
"key": "selector"
},
{
"match_all": true,
"key": "selection_empty"
},
{
"operator": "equal",
"operand": false,
"match_all": true,
"key": "has_next_field"
},
{
"operator": "equal",
"operand": true,
"match_all": true,
"key": "auto_complete_visible"
},
{
"operator": "equal",
"operand": false,
"match_all": true,
"key": "setting.disable_tab_abbreviations_on_auto_complete"
},
{
"match_all": true,
"key": "is_abbreviation"
}
]
},
{
"keys": [
"enter"
],
"args": {
"contents": "\n\t${0}\n"
},
"command": "insert_snippet",
"context": [
{
"operand": "meta.scope.between-tag-pair.html, meta.scope.between-tag-pair.xml",
"match_all": true,
"key": "selector"
},
{
"operand": false,
"match_all": true,
"key": "auto_complete_visible"
},
{
"match_all": true,
"key": "clear_fields_on_enter_key"
},
{
"operand": false,
"match_all": true,
"key": "setting.disable_formatted_linebreak"
}
]
},
{
"keys": [
"#"
],
"args": {
"attribute": "id"
},
"command": "emmet_insert_attribute",
"context": [
{
"operand": "text.html meta.tag -string -punctuation.definition.tag.begin.html -meta.scope.between-tag-pair.html -source -meta.tag.template.value.twig",
"operator": "equal",
"match_all": true,
"key": "selector"
},
{
"operator": "equal",
"operand": true,
"key": "setting.auto_id_class"
}
]
},
{
"keys": [
"."
],
"args": {
"attribute": "class"
},
"command": "emmet_insert_attribute",
"context": [
{
"operand": "text.html meta.tag -string -punctuation.definition.tag.begin.html -meta.scope.between-tag-pair.html -source -meta.tag.template.value.twig",
"operator": "equal",
"match_all": true,
"key": "selector"
},
{
"operator": "equal",
"operand": true,
"key": "setting.auto_id_class"
}
]
},
//跳到符号定处
{ "keys": ["ctrl+shift+r"], "command": "goto_symbol_in_project" },
//跳转到光标前一位置,默认是 alt+- 和alt+shift+-号 改为 向前alt++ 但是修改无效
// { "keys": ["alt+keypad_minus"], "command": "jump_back" },
// { "keys": ["alt+keypad_plus"], "command": "jump_forward" },
//Sublime Text 格式化代码快捷键自定义
{"keys": ["ctrl+alt+j"], "command": "reindent"},
//sidebar rename重命名快捷键20160111修改
{ "keys": ["alt+f1"], "command": "side_bar_rename" },
//全路径修改
{ "keys": ["shift+f1"], "command": "side_bar_move" },
// 当前文档显示在侧边栏树目录种
{ "keys": ["ctrl+f1"], "command": "reveal_in_side_bar" },
//在资源管理器中显示当前文件
{ "keys": ["f1"], "command": "open_dir", "args": {"dir": "$file_path", "file": "$file_name"} },
// 当前文档显示在侧边栏树目录种
// { "keys": ["ctrl+shift+r"], "command": "reveal_in_side_bar"},
// 拷贝当前文件路径
{
"keys": ["ctrl+alt+c"],
"command": "copy_path"
},
//自动完成设置,When "tab_completion" is set to false, this forces the Tab key to insert a tab instead of selecting a match whenever an auto-complete window is visible. Use **Enter ** if you want to select a match.
//关闭tab_completion tab键插入,alt+/或者ctrl+space 打开自动完成窗口,然后tab, alt+/ ,ctrl+space选择下一个提示,shift+tab上一个
// { "keys": ["tab"], "command": "insert", "args": {"characters": "\t"}, "context":
// [ { "key": "auto_complete_visible" },
// { "key": "setting.tab_completion", "operator": "equal", "operand": true }
// ]
// },
//自动完成列表,上下选中键添加 tab和shift+tab循环选中下个项目2016-09-07 14:04:47
{
// "keys": ["tab"],
"keys": ["alt+/"],
"command": "move",
"args": {"by": "lines", "forward": true},
"context": [{"key": "auto_complete_visible"}]
},
{
// "keys": ["shift+tab"],
"keys": ["shift+alt+/"],
"command": "move",
"args": {"by": "lines", "forward": false},
"context": [{"key": "auto_complete_visible"}]
},
// 自动完成设置,默认是ctrl+space和系统切换输入法冲突
{ "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 }
]
},
// 默认滚屏1行是ctrl+up,被emmet占用为数字增加1,此处修改为alt+ctrl+up,滚屏为3行。
{
"keys": ["alt+shift+k"],
"command": "scroll_lines",
"args": {
"amount": 3.0
}
}, {
"keys": ["alt+shift+j"],
"command": "scroll_lines",
"args": {
"amount": -3.0
}
},
// 光标移动
/*alt+l 光标右移一个字符
alt+h 光标左移一个字符
alt+k 光标上移一行
alt+j 光标下移一行*/
{
"keys": ["alt+l"],
"command": "move",
"args": {
"by": "characters",
"forward": true
}
}, {
"keys": ["alt+h"],
"command": "move",
"args": {
"by": "characters",
"forward": false
}
}, {
"keys": ["alt+j"],
"command": "move",
"args": {
"by": "lines",
"forward": true
}
}, {
"keys": ["alt+k"],
"command": "move",
"args": {
"by": "lines",
"forward": false
}
},
// enter 回车键和tab键跳出括号
// -------------------------------------------------------------------------
// Auto-complete behaviour for ), ], '', ""
// Bind to , to step over the auto-completed character(s)
// -------------------------------------------------------------------------
{"keys": ["enter"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "following_text", "operator": "regex_contains", "operand": "^[)\\]\\>\\'\\\"\\ %>\\}\\;\\,]", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_match", "operand": "^.*\\{$", "match_all": true },
// { "key": "auto_complete_visible", "operator": "equal", "operand": true }
//上面设置意思是自动完成列表打开状态true,按enter键也是直接往前跳一个字符。
]
},
// { "keys": ["enter"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
// [
// { "key": "following_text", "operator": "regex_contains", "operand": "^[)\\]'\"]", "match_all": true },
// { "key": "preceding_text", "operator": "regex_contains", "operand": "[(['\"]", "match_all": true },
// { "key": "auto_complete_visible", "operator": "equal", "operand": false }
// ]
// },
// // { "keys": ["
// tab"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
// [
// { "key": "following_text", "operator": "regex_contains", "operand": "^[)\\]'\"]", "match_all": true },
// { "key": "preceding_text", "operator": "regex_contains", "operand": "[(['\"]", "match_all": true },
// { "key": "auto_complete_visible", "operator": "equal", "operand": false }
// ]
// },
//style token 设置快捷键
{ "keys": ["ctrl+super+w", "1"], "command": "token_style", "args" : {"style_index" : 0 } },
{ "keys": ["ctrl+super+w", "2"], "command": "token_style", "args" : {"style_index" : 1 } },
{ "keys": ["ctrl+super+w", "3"], "command": "token_style", "args" : {"style_index" : 2 } },
{ "keys": ["ctrl+super+w", "4"], "command": "token_style", "args" : {"style_index" : 3 } },
{ "keys": ["ctrl+super+w", "5"], "command": "token_style", "args" : {"style_index" : 4 } },
{ "keys": ["ctrl+super+w", "7"], "command": "token_style_go", "args" : {"style_index" : 1 } },
{ "keys": ["ctrl+super+w", "8"], "command": "token_style_clear", "args" : {"style_index" : 1 } },
{ "keys": ["ctrl+super+w", "w"], "command": "token_style_clear" },
{ "keys": ["ctrl+super+\\"], "command": "token_style_go" },
{ "keys": ["ctrl+super+shift+\\"], "command": "token_style_go_back" },
//ctrl+tab按顺序切换
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
// brackethighlighter
// 删除括号对 Remove brackets
{
"keys": ["ctrl+shift+super+r"],
"command": "bh_remove_brackets"
},
// 弹出切换项目快捷键
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" },
// ctrl+shift+f批量查找被windows输入法占用
{ "keys": ["ctrl+alt+f"], "command": "show_panel", "args": {"panel": "find_in_files"} },
/*以下为自定义浏览器快捷键代码*/
//firefox
/*{ "keys": ["f1"], "command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "C:\\software\\Browser\\Mozilla Firefox\\firefox.exe",
"extensions":".*" //匹配任何文件类型
}
}*/
// chrome 用chrome预览
{ "keys": ["shift+alt+c"], "command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
"extensions":".*"
}
},
//ie 用IE预览
// { "keys": ["shift+alt+i"], "command": "side_bar_files_open_with",
// "args": {
// "paths": [],
// "application": "C:\\Program Files\\Internet Explorer\\iexplore.exe",
// "extensions":".*"
// }
// },
//safari
/*{ "keys": ["f4"], "command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "C:\\software\\Browser\\Safari\\safari.exe",
"extensions":".*"
}
},*/
//opera
/* { "keys": ["f5"], "command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "C:\\software\\Browser\\opera\\opera.exe",
"extensions":".*"
}
}*/
// 用chrome从本地服务器预览,需要side_bar 插件支持并设置好
{ "keys": ["alt+shift+r"],
"command": "side_bar_open_in_browser" ,
"args":{"paths":[], "type":"testing", "browser":""}
},
]