-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
2917 lines (2912 loc) · 104 KB
/
index.ts
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
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Auto-generated by commands/generate.ts. Do not edit manually.
/** A provided command. */
export interface ICommand {
readonly id: string
readonly title: string
readonly description: string
readonly keybindings: { key: string, when: string }[]
}
/**
* Toggles Dance key bindings.
*/
export const toggle: ICommand & { readonly id: 'dance.toggle' } = {
id : 'dance.toggle',
title : 'Toggle',
description: 'Toggles Dance key bindings.',
keybindings: [],
}
/**
* Set Dance mode to Normal.
*
* Default key: `Escape` (`dance.mode == 'insert'`).
*/
export const setNormal: ICommand & { readonly id: 'dance.set.normal' } = {
id : 'dance.set.normal',
title : 'Set mode to Normal',
description: 'Set Dance mode to Normal.',
keybindings: [
{ key: 'escape', when: 'editorTextFocus && dance.mode == \'insert\'' },
],
}
/**
* Set Dance mode to Insert.
*/
export const setInsert: ICommand & { readonly id: 'dance.set.insert' } = {
id : 'dance.set.insert',
title : 'Set mode to Insert',
description: 'Set Dance mode to Insert.',
keybindings: [],
}
/**
* Switches to normal mode temporarily.
*
* Default key: `Ctrl+V` (`dance.mode == 'insert'`).
*/
export const tmpNormal: ICommand & { readonly id: 'dance.tmp.normal' } = {
id : 'dance.tmp.normal',
title : 'Temporary normal mode',
description: 'Switches to normal mode temporarily.',
keybindings: [
{ key: 'Ctrl+v', when: 'editorTextFocus && dance.mode == \'insert\'' },
],
}
/**
* Switches to insert mode temporarily.
*
* Default key: `Ctrl+V` (`dance.mode == 'normal'`).
*/
export const tmpInsert: ICommand & { readonly id: 'dance.tmp.insert' } = {
id : 'dance.tmp.insert',
title : 'Temporary insert mode',
description: 'Switches to insert mode temporarily.',
keybindings: [
{ key: 'Ctrl+v', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Start insert before the current selections.
*
* Default key: `I` (`dance.mode == 'normal'`).
*/
export const insertBefore: ICommand & { readonly id: 'dance.insert.before' } = {
id : 'dance.insert.before',
title : 'Insert before',
description: 'Start insert before the current selections.',
keybindings: [
{ key: 'i', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Start insert after the current selections.
*
* Default key: `A` (`dance.mode == 'normal'`).
*/
export const insertAfter: ICommand & { readonly id: 'dance.insert.after' } = {
id : 'dance.insert.after',
title : 'Insert after',
description: 'Start insert after the current selections.',
keybindings: [
{ key: 'a', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Start insert at line start of each selection.
*
* Default key: `Shift+I` (`dance.mode == 'normal'`).
*/
export const insertLineStart: ICommand & { readonly id: 'dance.insert.lineStart' } = {
id : 'dance.insert.lineStart',
title : 'Insert at line start',
description: 'Start insert at line start of each selection.',
keybindings: [
{ key: 'Shift+i', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Start insert at line end of each selection.
*
* Default key: `Shift+A` (`dance.mode == 'normal'`).
*/
export const insertLineEnd: ICommand & { readonly id: 'dance.insert.lineEnd' } = {
id : 'dance.insert.lineEnd',
title : 'Insert at line end',
description: 'Start insert at line end of each selection.',
keybindings: [
{ key: 'Shift+a', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Create new line and start insert below.
*
* Default key: `O` (`dance.mode == 'normal'`).
*/
export const insertNewLineBelow: ICommand & { readonly id: 'dance.insert.newLine.below' } = {
id : 'dance.insert.newLine.below',
title : 'Insert new line below',
description: 'Create new line and start insert below.',
keybindings: [
{ key: 'o', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Create new line and start insert above.
*
* Default key: `Shift+O` (`dance.mode == 'normal'`).
*/
export const insertNewLineAbove: ICommand & { readonly id: 'dance.insert.newLine.above' } = {
id : 'dance.insert.newLine.above',
title : 'Insert new line above',
description: 'Create new line and start insert above.',
keybindings: [
{ key: 'Shift+o', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Add a new line below, without entering insert mode.
*
* Default key: `Alt+O` (`dance.mode == 'normal'`).
*/
export const newLineBelow: ICommand & { readonly id: 'dance.newLine.below' } = {
id : 'dance.newLine.below',
title : 'Add new line below',
description: 'Add a new line below, without entering insert mode.',
keybindings: [
{ key: 'Alt+o', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Add a new line above, without entering insert mode.
*
* Default key: `Shift+Alt+O` (`dance.mode == 'normal'`).
*/
export const newLineAbove: ICommand & { readonly id: 'dance.newLine.above' } = {
id : 'dance.newLine.above',
title : 'Add new line above',
description: 'Add a new line above, without entering insert mode.',
keybindings: [
{ key: 'Shift+Alt+o', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Repeat last insert-mode change.
*
* Default key: `.` (`dance.mode == 'normal'`).
*/
export const repeatInsert: ICommand & { readonly id: 'dance.repeat.insert' } = {
id : 'dance.repeat.insert',
title : 'Repeat last insert-mode change',
description: 'Repeat last insert-mode change.',
keybindings: [
{ key: '.', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Repeat last object select / character find.
*
* Default key: `Alt+.` (`dance.mode == 'normal'`).
*/
export const repeatObjectOrSelectTo: ICommand & { readonly id: 'dance.repeat.objectOrSelectTo' } = {
id : 'dance.repeat.objectOrSelectTo',
title : 'Repeat last object select / character find',
description: 'Repeat last object select / character find.',
keybindings: [
{ key: 'Alt+.', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Move left.
*
* Default keys: `Left` (`dance.mode == 'normal'`), `H` (`dance.mode == 'normal'`).
*/
export const left: ICommand & { readonly id: 'dance.left' } = {
id : 'dance.left',
title : 'Move left',
description: 'Move left.',
keybindings: [
{ key: 'left', when: 'editorTextFocus && dance.mode == \'normal\'' },
{ key: 'h', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Move right.
*
* Default keys: `Right` (`dance.mode == 'normal'`), `L` (`dance.mode == 'normal'`).
*/
export const right: ICommand & { readonly id: 'dance.right' } = {
id : 'dance.right',
title : 'Move right',
description: 'Move right.',
keybindings: [
{ key: 'right', when: 'editorTextFocus && dance.mode == \'normal\'' },
{ key: 'l', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Move up.
*
* Default keys: `Up` (`dance.mode == 'normal'`), `K` (`dance.mode == 'normal'`).
*/
export const up: ICommand & { readonly id: 'dance.up' } = {
id : 'dance.up',
title : 'Move up',
description: 'Move up.',
keybindings: [
{ key: 'up', when: 'editorTextFocus && dance.mode == \'normal\'' },
{ key: 'k', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Move down.
*
* Default keys: `Down` (`dance.mode == 'normal'`), `J` (`dance.mode == 'normal'`).
*/
export const down: ICommand & { readonly id: 'dance.down' } = {
id : 'dance.down',
title : 'Move down',
description: 'Move down.',
keybindings: [
{ key: 'down', when: 'editorTextFocus && dance.mode == \'normal\'' },
{ key: 'j', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Scroll one page up.
*
* Default keys: `Ctrl+B` (`dance.mode == 'normal'`), `Ctrl+B` (`dance.mode == 'insert'`).
*/
export const upPage: ICommand & { readonly id: 'dance.up.page' } = {
id : 'dance.up.page',
title : 'Scroll one page up',
description: 'Scroll one page up.',
keybindings: [
{ key: 'Ctrl+b', when: 'editorTextFocus && dance.mode == \'normal\'' },
{ key: 'Ctrl+b', when: 'editorTextFocus && dance.mode == \'insert\'' },
],
}
/**
* Scroll one page down.
*
* Default keys: `Ctrl+F` (`dance.mode == 'normal'`), `Ctrl+F` (`dance.mode == 'insert'`).
*/
export const downPage: ICommand & { readonly id: 'dance.down.page' } = {
id : 'dance.down.page',
title : 'Scroll one page down',
description: 'Scroll one page down.',
keybindings: [
{ key: 'Ctrl+f', when: 'editorTextFocus && dance.mode == \'normal\'' },
{ key: 'Ctrl+f', when: 'editorTextFocus && dance.mode == \'insert\'' },
],
}
/**
* Scroll half a page up.
*
* Default keys: `Ctrl+U` (`dance.mode == 'normal'`), `Ctrl+U` (`dance.mode == 'insert'`).
*/
export const upHalfPage: ICommand & { readonly id: 'dance.up.halfPage' } = {
id : 'dance.up.halfPage',
title : 'Scroll half a page up',
description: 'Scroll half a page up.',
keybindings: [
{ key: 'Ctrl+u', when: 'editorTextFocus && dance.mode == \'normal\'' },
{ key: 'Ctrl+u', when: 'editorTextFocus && dance.mode == \'insert\'' },
],
}
/**
* Scroll half a page down.
*
* Default keys: `Ctrl+D` (`dance.mode == 'normal'`), `Ctrl+D` (`dance.mode == 'insert'`).
*/
export const downHalfPage: ICommand & { readonly id: 'dance.down.halfPage' } = {
id : 'dance.down.halfPage',
title : 'Scroll half a page down',
description: 'Scroll half a page down.',
keybindings: [
{ key: 'Ctrl+d', when: 'editorTextFocus && dance.mode == \'normal\'' },
{ key: 'Ctrl+d', when: 'editorTextFocus && dance.mode == \'insert\'' },
],
}
/**
* Select to the next character pressed, including it.
*
* Default key: `F` (`dance.mode == 'normal'`).
*/
export const selectToIncluded: ICommand & { readonly id: 'dance.select.to.included' } = {
id : 'dance.select.to.included',
title : 'Select to',
description: 'Select to the next character pressed, including it.',
keybindings: [
{ key: 'f', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Select until the next character pressed, excluding it.
*
* Default key: `T` (`dance.mode == 'normal'`).
*/
export const selectToExcluded: ICommand & { readonly id: 'dance.select.to.excluded' } = {
id : 'dance.select.to.excluded',
title : 'Select until',
description: 'Select until the next character pressed, excluding it.',
keybindings: [
{ key: 't', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Select whole buffer.
*
* Default key: `Shift+5` (`dance.mode == 'normal'`).
*/
export const selectBuffer: ICommand & { readonly id: 'dance.select.buffer' } = {
id : 'dance.select.buffer',
title : 'Select whole buffer',
description: 'Select whole buffer.',
keybindings: [
{ key: 'Shift+5', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Select line on which the end of each selection lies (or next line when end lies on an end-of-line).
*
* Default key: `X` (`dance.mode == 'normal'`).
*/
export const selectLine: ICommand & { readonly id: 'dance.select.line' } = {
id : 'dance.select.line',
title : 'Select line',
description: 'Select line on which the end of each selection lies (or next line when end lies on an end-of-line).',
keybindings: [
{ key: 'x', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Select to line beginning.
*
* Default keys: `Alt+H` (`dance.mode == 'normal'`), `Home` (`dance.mode == 'normal'`).
*/
export const selectToLineBegin: ICommand & { readonly id: 'dance.select.toLineBegin' } = {
id : 'dance.select.toLineBegin',
title : 'Select to line beginning',
description: 'Select to line beginning.',
keybindings: [
{ key: 'Alt+h', when: 'editorTextFocus && dance.mode == \'normal\'' },
{ key: 'home', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Select to line end.
*
* Default keys: `Alt+L` (`dance.mode == 'normal'`), `End` (`dance.mode == 'normal'`).
*/
export const selectToLineEnd: ICommand & { readonly id: 'dance.select.toLineEnd' } = {
id : 'dance.select.toLineEnd',
title : 'Select to line end',
description: 'Select to line end.',
keybindings: [
{ key: 'Alt+l', when: 'editorTextFocus && dance.mode == \'normal\'' },
{ key: 'end', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Select enclosing characters.
*
* Default key: `M` (`dance.mode == 'normal'`).
*/
export const selectEnclosing: ICommand & { readonly id: 'dance.select.enclosing' } = {
id : 'dance.select.enclosing',
title : 'Select enclosing characters',
description: 'Select enclosing characters.',
keybindings: [
{ key: 'm', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Extend selections to contain full lines (including end-of-lines).
*
* Default key: `Alt+X` (`dance.mode == 'normal'`).
*/
export const expandLines: ICommand & { readonly id: 'dance.expandLines' } = {
id : 'dance.expandLines',
title : 'Extend lines',
description: 'Extend selections to contain full lines (including end-of-lines).',
keybindings: [
{ key: 'Alt+x', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Trim selections to only contain full lines (from start to line break).
*
* Default key: `Shift+Alt+X` (`dance.mode == 'normal'`).
*/
export const trimLines: ICommand & { readonly id: 'dance.trimLines' } = {
id : 'dance.trimLines',
title : 'Trim lines',
description: 'Trim selections to only contain full lines (from start to line break).',
keybindings: [
{ key: 'Shift+Alt+x', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Trim whitespace at beginning and end of selections.
*
* Default key: `Shift+-` (`dance.mode == 'normal'`).
*/
export const trimSelections: ICommand & { readonly id: 'dance.trimSelections' } = {
id : 'dance.trimSelections',
title : 'Trim selections',
description: 'Trim whitespace at beginning and end of selections.',
keybindings: [
{ key: 'Shift+-', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Select the word and following whitespaces on the right of the end of each selection.
*
* Default key: `W` (`dance.mode == 'normal'`).
*/
export const selectWord: ICommand & { readonly id: 'dance.select.word' } = {
id : 'dance.select.word',
title : 'Select to next word start',
description: 'Select the word and following whitespaces on the right of the end of each selection.',
keybindings: [
{ key: 'w', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Select preceding whitespaces and the word on the left of the end of each selection.
*
* Default key: `B` (`dance.mode == 'normal'`).
*/
export const selectWordPrevious: ICommand & { readonly id: 'dance.select.word.previous' } = {
id : 'dance.select.word.previous',
title : 'Select to previous word start',
description: 'Select preceding whitespaces and the word on the left of the end of each selection.',
keybindings: [
{ key: 'b', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Select preceding whitespaces and the word on the right of the end of each selection.
*
* Default key: `E` (`dance.mode == 'normal'`).
*/
export const selectWordEnd: ICommand & { readonly id: 'dance.select.word.end' } = {
id : 'dance.select.word.end',
title : 'Select to next word end',
description: 'Select preceding whitespaces and the word on the right of the end of each selection.',
keybindings: [
{ key: 'e', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Select the non-whitespace word and following whitespaces on the right of the end of each selection.
*
* Default key: `Alt+W` (`dance.mode == 'normal'`).
*/
export const selectWordAlt: ICommand & { readonly id: 'dance.select.word.alt' } = {
id : 'dance.select.word.alt',
title : 'Select to next non-whitespace word start',
description: 'Select the non-whitespace word and following whitespaces on the right of the end of each selection.',
keybindings: [
{ key: 'Alt+w', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Select preceding whitespaces and the non-whitespace word on the left of the end of each selection.
*
* Default key: `Alt+B` (`dance.mode == 'normal'`).
*/
export const selectWordAltPrevious: ICommand & { readonly id: 'dance.select.word.alt.previous' } = {
id : 'dance.select.word.alt.previous',
title : 'Select to previous non-whitespace word start',
description: 'Select preceding whitespaces and the non-whitespace word on the left of the end of each selection.',
keybindings: [
{ key: 'Alt+b', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Select preceding whitespaces and the non-whitespace word on the right of the end of each selection.
*
* Default key: `Alt+E` (`dance.mode == 'normal'`).
*/
export const selectWordAltEnd: ICommand & { readonly id: 'dance.select.word.alt.end' } = {
id : 'dance.select.word.alt.end',
title : 'Select to next non-whitespace word end',
description: 'Select preceding whitespaces and the non-whitespace word on the right of the end of each selection.',
keybindings: [
{ key: 'Alt+e', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Select within current selections according to a RegExp.
*
* Default key: `S` (`dance.mode == 'normal'`).
*/
export const select: ICommand & { readonly id: 'dance.select' } = {
id : 'dance.select',
title : 'Select',
description: 'Select within current selections according to a RegExp.',
keybindings: [
{ key: 's', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Split within current selections according to a RegExp.
*
* Default key: `Shift+S` (`dance.mode == 'normal'`).
*/
export const split: ICommand & { readonly id: 'dance.split' } = {
id : 'dance.split',
title : 'Split',
description: 'Split within current selections according to a RegExp.',
keybindings: [
{ key: 'Shift+s', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Split selections into lines.
*
* Default key: `Alt+S` (`dance.mode == 'normal'`).
*/
export const splitLines: ICommand & { readonly id: 'dance.split.lines' } = {
id : 'dance.split.lines',
title : 'Split lines',
description: 'Split selections into lines.',
keybindings: [
{ key: 'Alt+s', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Select first and last characters of each selection.
*
* Default key: `Shift+Alt+S` (`dance.mode == 'normal'`).
*/
export const selectFirstLast: ICommand & { readonly id: 'dance.select.firstLast' } = {
id : 'dance.select.firstLast',
title : 'Select first and last characters',
description: 'Select first and last characters of each selection.',
keybindings: [
{ key: 'Shift+Alt+s', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Copy selection to next line.
*
* Default key: `Shift+C` (`dance.mode == 'normal'`).
*/
export const selectCopy: ICommand & { readonly id: 'dance.select.copy' } = {
id : 'dance.select.copy',
title : 'Copy selection to next line',
description: 'Copy selection to next line.',
keybindings: [
{ key: 'Shift+c', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Copy selection to previous line.
*
* Default key: `Shift+Alt+C` (`dance.mode == 'normal'`).
*/
export const selectCopyBackwards: ICommand & { readonly id: 'dance.select.copy.backwards' } = {
id : 'dance.select.copy.backwards',
title : 'Copy selection to previous line',
description: 'Copy selection to previous line.',
keybindings: [
{ key: 'Shift+Alt+c', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Reduce selections to their cursor.
*
* Default key: `;` (`dance.mode == 'normal'`).
*/
export const selectionsReduce: ICommand & { readonly id: 'dance.selections.reduce' } = {
id : 'dance.selections.reduce',
title : 'Reduce selections',
description: 'Reduce selections to their cursor.',
keybindings: [
{ key: ';', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Flip the direction of each selection.
*
* Default key: `Alt+;` (`dance.mode == 'normal'`).
*/
export const selectionsFlip: ICommand & { readonly id: 'dance.selections.flip' } = {
id : 'dance.selections.flip',
title : 'Flip selections',
description: 'Flip the direction of each selection.',
keybindings: [
{ key: 'Alt+;', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Ensure selections are in forward direction (the active cursor is after the anchor).
*
* Default key: `Shift+Alt+;` (`dance.mode == 'normal'`).
*/
export const selectionsForward: ICommand & { readonly id: 'dance.selections.forward' } = {
id : 'dance.selections.forward',
title : 'Forward selections',
description: 'Ensure selections are in forward direction (the active cursor is after the anchor).',
keybindings: [
{ key: 'Shift+Alt+;', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Ensure selections are in backward direction (the active cursor is before the anchor).
*/
export const selectionsBackward: ICommand & { readonly id: 'dance.selections.backward' } = {
id : 'dance.selections.backward',
title : 'Backward selections',
description: 'Ensure selections are in backward direction (the active cursor is before the anchor).',
keybindings: [],
}
/**
* Clear selections (except main)
*
* Default key: `Space` (`dance.mode == 'normal'`).
*/
export const selectionsClear: ICommand & { readonly id: 'dance.selections.clear' } = {
id : 'dance.selections.clear',
title : 'Clear selections',
description: 'Clear selections (except main)',
keybindings: [
{ key: 'space', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Clear main selection.
*
* Default key: `Alt+Space` (`dance.mode == 'normal'`).
*/
export const selectionsClearMain: ICommand & { readonly id: 'dance.selections.clearMain' } = {
id : 'dance.selections.clearMain',
title : 'Clear main selection',
description: 'Clear main selection.',
keybindings: [
{ key: 'Alt+space', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Keep selections that match a RegExp.
*
* Default key: `Alt+K` (`dance.mode == 'normal'`).
*/
export const selectionsKeepMatching: ICommand & { readonly id: 'dance.selections.keepMatching' } = {
id : 'dance.selections.keepMatching',
title : 'Keep matching selections',
description: 'Keep selections that match a RegExp.',
keybindings: [
{ key: 'Alt+k', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Clear selections that match a RegExp.
*
* Default key: `Shift+Alt+K` (`dance.mode == 'normal'`).
*/
export const selectionsClearMatching: ICommand & { readonly id: 'dance.selections.clearMatching' } = {
id : 'dance.selections.clearMatching',
title : 'Clear matching selections',
description: 'Clear selections that match a RegExp.',
keybindings: [
{ key: 'Shift+Alt+k', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Merge contiguous selections together, including across lines.
*
* Default key: `Shift+Alt+-` (`dance.mode == 'normal'`).
*/
export const selectionsMerge: ICommand & { readonly id: 'dance.selections.merge' } = {
id : 'dance.selections.merge',
title : 'Merge contiguous selections',
description: 'Merge contiguous selections together, including across lines.',
keybindings: [
{ key: 'Shift+Alt+-', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Align selections, aligning the cursor of each selection by inserting spaces before the first character of each selection.
*
* Default key: `Shift+7` (`dance.mode == 'normal'`).
*/
export const selectionsAlign: ICommand & { readonly id: 'dance.selections.align' } = {
id : 'dance.selections.align',
title : 'Align selections',
description: 'Align selections, aligning the cursor of each selection by inserting spaces before the first character of each selection.',
keybindings: [
{ key: 'Shift+7', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Copy the indentation of the main selection (or the count one if a count is given) to all other ones.
*
* Default key: `Shift+Alt+7` (`dance.mode == 'normal'`).
*/
export const selectionsAlignCopy: ICommand & { readonly id: 'dance.selections.align.copy' } = {
id : 'dance.selections.align.copy',
title : 'Copy indentation',
description: 'Copy the indentation of the main selection (or the count one if a count is given) to all other ones.',
keybindings: [
{ key: 'Shift+Alt+7', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Yank and delete selections.
*
* Default key: `D` (`dance.mode == 'normal'`).
*/
export const deleteYank: ICommand & { readonly id: 'dance.delete.yank' } = {
id : 'dance.delete.yank',
title : 'Yank and delete',
description: 'Yank and delete selections.',
keybindings: [
{ key: 'd', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Yank, delete and enter insert mode.
*
* Default key: `C` (`dance.mode == 'normal'`).
*/
export const deleteInsertYank: ICommand & { readonly id: 'dance.delete.insert.yank' } = {
id : 'dance.delete.insert.yank',
title : 'Yank, delete and insert',
description: 'Yank, delete and enter insert mode.',
keybindings: [
{ key: 'c', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Delete selections without yanking.
*
* Default key: `Alt+D` (`dance.mode == 'normal'`).
*/
export const deleteNoYank: ICommand & { readonly id: 'dance.delete.noYank' } = {
id : 'dance.delete.noYank',
title : 'Delete without yank',
description: 'Delete selections without yanking.',
keybindings: [
{ key: 'Alt+d', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Delete selections without yanking and enter insert mode.
*
* Default key: `Alt+C` (`dance.mode == 'normal'`).
*/
export const deleteInsertNoYank: ICommand & { readonly id: 'dance.delete.insert.noYank' } = {
id : 'dance.delete.insert.noYank',
title : 'Delete and insert without yank',
description: 'Delete selections without yanking and enter insert mode.',
keybindings: [
{ key: 'Alt+c', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Yank selections.
*
* Default key: `Y` (`dance.mode == 'normal'`).
*/
export const yank: ICommand & { readonly id: 'dance.yank' } = {
id : 'dance.yank',
title : 'Yank',
description: 'Yank selections.',
keybindings: [
{ key: 'y', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Paste after the end of each selection.
*
* Default key: `P` (`dance.mode == 'normal'`).
*/
export const pasteAfter: ICommand & { readonly id: 'dance.paste.after' } = {
id : 'dance.paste.after',
title : 'Paste after',
description: 'Paste after the end of each selection.',
keybindings: [
{ key: 'p', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Paste before the start of each selection.
*
* Default key: `Shift+P` (`dance.mode == 'normal'`).
*/
export const pasteBefore: ICommand & { readonly id: 'dance.paste.before' } = {
id : 'dance.paste.before',
title : 'Paste before',
description: 'Paste before the start of each selection.',
keybindings: [
{ key: 'Shift+p', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Paste after the end of each selection and select pasted text.
*
* Default key: `Alt+P` (`dance.mode == 'normal'`).
*/
export const pasteSelectAfter: ICommand & { readonly id: 'dance.paste.select.after' } = {
id : 'dance.paste.select.after',
title : 'Paste after and select',
description: 'Paste after the end of each selection and select pasted text.',
keybindings: [
{ key: 'Alt+p', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Paste before the start of each selection and select pasted text.
*
* Default key: `Shift+Alt+P` (`dance.mode == 'normal'`).
*/
export const pasteSelectBefore: ICommand & { readonly id: 'dance.paste.select.before' } = {
id : 'dance.paste.select.before',
title : 'Paste before and select',
description: 'Paste before the start of each selection and select pasted text.',
keybindings: [
{ key: 'Shift+Alt+p', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Replace selections with yanked text.
*
* Default key: `Shift+R` (`dance.mode == 'normal'`).
*/
export const pasteReplace: ICommand & { readonly id: 'dance.paste.replace' } = {
id : 'dance.paste.replace',
title : 'Replace',
description: 'Replace selections with yanked text.',
keybindings: [
{ key: 'Shift+r', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Replace selections with every yanked text.
*
* Default key: `Shift+Alt+R` (`dance.mode == 'normal'`).
*/
export const pasteReplaceEvery: ICommand & { readonly id: 'dance.paste.replace.every' } = {
id : 'dance.paste.replace.every',
title : 'Replace with every',
description: 'Replace selections with every yanked text.',
keybindings: [
{ key: 'Shift+Alt+r', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Replace each selected character with the next entered one.
*
* Default key: `R` (`dance.mode == 'normal'`).
*/
export const replaceCharacters: ICommand & { readonly id: 'dance.replace.characters' } = {
id : 'dance.replace.characters',
title : 'Replace character',
description: 'Replace each selected character with the next entered one.',
keybindings: [
{ key: 'r', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Join selected lines.
*
* Default key: `Alt+J` (`dance.mode == 'normal'`).
*/
export const join: ICommand & { readonly id: 'dance.join' } = {
id : 'dance.join',
title : 'Join lines',
description: 'Join selected lines.',
keybindings: [
{ key: 'Alt+j', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Join selected lines and select spaces inserted in place of line breaks.
*
* Default key: `Shift+Alt+J` (`dance.mode == 'normal'`).
*/
export const joinSelect: ICommand & { readonly id: 'dance.join.select' } = {
id : 'dance.join.select',
title : 'Join lines and select spaces',
description: 'Join selected lines and select spaces inserted in place of line breaks.',
keybindings: [
{ key: 'Shift+Alt+j', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Indent selected lines.
*
* Default key: `Shift+.` (`dance.mode == 'normal'`).
*/
export const indent: ICommand & { readonly id: 'dance.indent' } = {
id : 'dance.indent',
title : 'Indent',
description: 'Indent selected lines.',
keybindings: [
{ key: 'Shift+.', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Indent selected lines (including empty lines).
*
* Default key: `Shift+Alt+.` (`dance.mode == 'normal'`).
*/
export const indentWithEmpty: ICommand & { readonly id: 'dance.indent.withEmpty' } = {
id : 'dance.indent.withEmpty',
title : 'Indent (including empty)',
description: 'Indent selected lines (including empty lines).',
keybindings: [
{ key: 'Shift+Alt+.', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Deindent selected lines.
*
* Default key: `Shift+Alt+,` (`dance.mode == 'normal'`).
*/
export const deindent: ICommand & { readonly id: 'dance.deindent' } = {
id : 'dance.deindent',
title : 'Deindent',
description: 'Deindent selected lines.',
keybindings: [
{ key: 'Shift+Alt+,', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Deindent selected lines (and remove additional incomplete indent).
*
* Default key: `Shift+,` (`dance.mode == 'normal'`).
*/
export const deindentFurther: ICommand & { readonly id: 'dance.deindent.further' } = {
id : 'dance.deindent.further',
title : 'Deindent (including incomplete indent)',
description: 'Deindent selected lines (and remove additional incomplete indent).',
keybindings: [
{ key: 'Shift+,', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Transform to lowercase.
*
* Default key: ``` (`dance.mode == 'normal'`).
*/
export const toLowerCase: ICommand & { readonly id: 'dance.toLowerCase' } = {
id : 'dance.toLowerCase',
title : 'Transform to lowercase',
description: 'Transform to lowercase.',
keybindings: [
{ key: '`', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Transform to uppercase.
*
* Default key: `Shift+`` (`dance.mode == 'normal'`).
*/
export const toUpperCase: ICommand & { readonly id: 'dance.toUpperCase' } = {
id : 'dance.toUpperCase',
title : 'Transform to uppercase',
description: 'Transform to uppercase.',
keybindings: [
{ key: 'Shift+`', when: 'editorTextFocus && dance.mode == \'normal\'' },
],
}
/**
* Swap case.
*
* Default key: `Alt+`` (`dance.mode == 'normal'`).