@lvce-editor/editor-worker 5.10.0 → 5.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/api.d.ts +3 -2
- package/dist/editorWorkerMain.js +631 -458
- package/package.json +1 -1
package/dist/api/api.d.ts
CHANGED
|
@@ -4,13 +4,14 @@ interface EventMap {
|
|
|
4
4
|
'ColorPicker.loadContent': (state: any) => Promise<any>
|
|
5
5
|
'ColorPicker.render': (oldState: any, newState: any) => Promise<any>
|
|
6
6
|
'Editor.create': (options: any) => Promise<void>
|
|
7
|
+
'Editor.getQuickPickMenuEntries': () => Promise<readonly any[]>
|
|
7
8
|
'Editor.offsetAt': (textDocument: any, positionRowIndex: number, positionColumnIndex: number) => Promise<any>
|
|
8
9
|
'Editor.render': (editorUid: number) => Promise<any>
|
|
10
|
+
'EditorCompletion.closeDetails': (editorUid: number, state: any) => Promise<any>
|
|
9
11
|
'EditorCompletion.loadContent': (editorUid: number, state: any) => Promise<any>
|
|
12
|
+
'EditorCompletion.openDetails': (editorUid: number, state: any) => Promise<any>
|
|
10
13
|
'EditorCompletion.selectCurrent': (editorUid: number, state: any) => Promise<any>
|
|
11
14
|
'EditorCompletion.selectIndex': (editorUid: number, state: any, index: number) => Promise<any>
|
|
12
|
-
'EditorCompletion.openDetails': (editorUid: number, state: any) => Promise<any>
|
|
13
|
-
'EditorCompletion.closeDetails': (editorUid: number, state: any) => Promise<any>
|
|
14
15
|
'EditorCompletion.toggleDetails': (editorUid: number, state: any) => Promise<any>
|
|
15
16
|
'FindWidget.focusFirst': (state: any) => Promise<any>
|
|
16
17
|
'FindWidget.focusIndex': (state: any, index: number) => Promise<any>
|
package/dist/editorWorkerMain.js
CHANGED
|
@@ -2763,453 +2763,50 @@ const copyLineDown = editor => {
|
|
|
2763
2763
|
return scheduleDocumentAndCursorsSelections(editor, changes);
|
|
2764
2764
|
};
|
|
2765
2765
|
|
|
2766
|
-
const
|
|
2767
|
-
const
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
const
|
|
2771
|
-
const
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
const
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
const KeyJ = 38;
|
|
2784
|
-
const KeyK = 39;
|
|
2785
|
-
const KeyL = 40;
|
|
2786
|
-
const KeyO = 43;
|
|
2787
|
-
const KeyV = 50;
|
|
2788
|
-
const KeyX = 52;
|
|
2789
|
-
const KeyZ = 54;
|
|
2790
|
-
const F2 = 58;
|
|
2791
|
-
const F3 = 59;
|
|
2792
|
-
const F4 = 60;
|
|
2793
|
-
const F12 = 68;
|
|
2794
|
-
const Period = 87;
|
|
2795
|
-
const Slash$1 = 88;
|
|
2796
|
-
const BracketLeft = 90;
|
|
2797
|
-
const BracketRight = 92;
|
|
2766
|
+
const copyLineUp = editor => {
|
|
2767
|
+
const {
|
|
2768
|
+
selections
|
|
2769
|
+
} = editor;
|
|
2770
|
+
const rowIndex = selections[0];
|
|
2771
|
+
const position = {
|
|
2772
|
+
rowIndex: rowIndex,
|
|
2773
|
+
columnIndex: 0
|
|
2774
|
+
};
|
|
2775
|
+
const changes = [{
|
|
2776
|
+
start: position,
|
|
2777
|
+
end: position,
|
|
2778
|
+
inserted: [getLine(editor, rowIndex), ''],
|
|
2779
|
+
deleted: ['']
|
|
2780
|
+
}];
|
|
2781
|
+
return scheduleDocumentAndCursorsSelections(editor, changes);
|
|
2782
|
+
};
|
|
2798
2783
|
|
|
2799
|
-
|
|
2800
|
-
const
|
|
2801
|
-
|
|
2784
|
+
// @ts-ignore
|
|
2785
|
+
const editorGetPositionLeft = (rowIndex, columnIndex, lines, getDelta) => {
|
|
2786
|
+
if (columnIndex === 0) {
|
|
2787
|
+
if (rowIndex === 0) {
|
|
2788
|
+
return {
|
|
2789
|
+
rowIndex: 0,
|
|
2790
|
+
columnIndex: 0
|
|
2791
|
+
};
|
|
2792
|
+
}
|
|
2793
|
+
return {
|
|
2794
|
+
rowIndex: rowIndex - 1,
|
|
2795
|
+
columnIndex: lines[rowIndex - 1].length
|
|
2796
|
+
};
|
|
2797
|
+
}
|
|
2798
|
+
const delta = getDelta(lines[rowIndex], columnIndex);
|
|
2799
|
+
return {
|
|
2800
|
+
rowIndex,
|
|
2801
|
+
columnIndex: columnIndex - delta
|
|
2802
|
+
};
|
|
2803
|
+
};
|
|
2802
2804
|
|
|
2803
|
-
|
|
2804
|
-
const
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
const FocusSourceActions = 38;
|
|
2809
|
-
const FocusFindWidgetReplace = 43;
|
|
2810
|
-
const FocusFindWidgetReplaceButton = 46;
|
|
2811
|
-
const FocusFindWidgetReplaceAllButton = 47;
|
|
2812
|
-
const FocusFindWidgetCloseButton = 48;
|
|
2813
|
-
const FocusFindWidgetNextMatchButton = 49;
|
|
2814
|
-
const FocusFindWidgetPreviousMatchButton = 50;
|
|
2815
|
-
const FocusEditorCodeGenerator = 52;
|
|
2816
|
-
|
|
2817
|
-
const getKeyBindings = () => {
|
|
2818
|
-
return [{
|
|
2819
|
-
key: Escape,
|
|
2820
|
-
command: 'Editor.closeSourceAction',
|
|
2821
|
-
when: FocusSourceActions
|
|
2822
|
-
}, {
|
|
2823
|
-
key: DownArrow,
|
|
2824
|
-
command: 'EditorSourceActions.focusNext',
|
|
2825
|
-
when: FocusSourceActions
|
|
2826
|
-
}, {
|
|
2827
|
-
key: UpArrow,
|
|
2828
|
-
command: 'EditorSourceActions.focusPrevious',
|
|
2829
|
-
when: FocusSourceActions
|
|
2830
|
-
}, {
|
|
2831
|
-
key: Home,
|
|
2832
|
-
command: 'EditorSourceActions.focusFirst',
|
|
2833
|
-
when: FocusSourceActions
|
|
2834
|
-
}, {
|
|
2835
|
-
key: End,
|
|
2836
|
-
command: 'EditorSourceActions.focusLast',
|
|
2837
|
-
when: FocusSourceActions
|
|
2838
|
-
}, {
|
|
2839
|
-
key: Enter,
|
|
2840
|
-
command: 'EditorSourceActions.selectCurrent',
|
|
2841
|
-
when: FocusSourceActions
|
|
2842
|
-
}, {
|
|
2843
|
-
key: Enter,
|
|
2844
|
-
command: 'FindWidget.focusNext',
|
|
2845
|
-
when: FocusFindWidget
|
|
2846
|
-
}, {
|
|
2847
|
-
key: Shift | F4,
|
|
2848
|
-
command: 'FindWidget.focusPrevious',
|
|
2849
|
-
when: FocusFindWidget
|
|
2850
|
-
}, {
|
|
2851
|
-
key: F4,
|
|
2852
|
-
command: 'FindWidget.focusNext',
|
|
2853
|
-
when: FocusFindWidget
|
|
2854
|
-
}, {
|
|
2855
|
-
key: Shift | Tab,
|
|
2856
|
-
command: 'FindWidget.focusToggleReplace',
|
|
2857
|
-
when: FocusFindWidget
|
|
2858
|
-
}, {
|
|
2859
|
-
key: Tab,
|
|
2860
|
-
command: 'FindWidget.focusReplace',
|
|
2861
|
-
when: FocusFindWidget
|
|
2862
|
-
}, {
|
|
2863
|
-
key: Tab,
|
|
2864
|
-
command: 'FindWidget.focusPreviousMatchButton',
|
|
2865
|
-
when: FocusFindWidgetReplace
|
|
2866
|
-
}, {
|
|
2867
|
-
key: Alt$1 | CtrlCmd | Enter,
|
|
2868
|
-
command: 'FindWidget.replaceAll',
|
|
2869
|
-
when: FocusFindWidgetReplace
|
|
2870
|
-
}, {
|
|
2871
|
-
key: Tab,
|
|
2872
|
-
command: 'FindWidget.focusNextMatchButton',
|
|
2873
|
-
when: FocusFindWidgetPreviousMatchButton
|
|
2874
|
-
}, {
|
|
2875
|
-
key: Shift | Tab,
|
|
2876
|
-
command: 'FindWidget.focusReplace',
|
|
2877
|
-
when: FocusFindWidgetPreviousMatchButton
|
|
2878
|
-
}, {
|
|
2879
|
-
key: Shift | Tab,
|
|
2880
|
-
command: 'FindWidget.focusPreviousMatchButton',
|
|
2881
|
-
when: FocusFindWidgetNextMatchButton
|
|
2882
|
-
}, {
|
|
2883
|
-
key: Tab,
|
|
2884
|
-
command: 'FindWidget.focusCloseButton',
|
|
2885
|
-
when: FocusFindWidgetNextMatchButton
|
|
2886
|
-
}, {
|
|
2887
|
-
key: Shift | Tab,
|
|
2888
|
-
command: 'FindWidget.focusNextMatchButton',
|
|
2889
|
-
when: FocusFindWidgetCloseButton
|
|
2890
|
-
}, {
|
|
2891
|
-
key: Tab,
|
|
2892
|
-
command: 'FindWidget.focusReplaceButton',
|
|
2893
|
-
when: FocusFindWidgetCloseButton
|
|
2894
|
-
}, {
|
|
2895
|
-
key: Shift | Tab,
|
|
2896
|
-
command: 'FindWidget.focusFind',
|
|
2897
|
-
when: FocusFindWidgetReplace
|
|
2898
|
-
}, {
|
|
2899
|
-
key: Tab,
|
|
2900
|
-
command: 'FindWidget.focusReplaceAllButton',
|
|
2901
|
-
when: FocusFindWidgetReplaceButton
|
|
2902
|
-
}, {
|
|
2903
|
-
key: Shift | Tab,
|
|
2904
|
-
command: 'FindWidget.focusCloseButton',
|
|
2905
|
-
when: FocusFindWidgetReplaceButton
|
|
2906
|
-
}, {
|
|
2907
|
-
key: Shift | Tab,
|
|
2908
|
-
command: 'FindWidget.focusReplaceButton',
|
|
2909
|
-
when: FocusFindWidgetReplaceAllButton
|
|
2910
|
-
}, {
|
|
2911
|
-
key: DownArrow,
|
|
2912
|
-
command: 'EditorCompletion.focusNext',
|
|
2913
|
-
when: FocusEditorCompletions
|
|
2914
|
-
}, {
|
|
2915
|
-
key: UpArrow,
|
|
2916
|
-
command: 'EditorCompletion.focusPrevious',
|
|
2917
|
-
when: FocusEditorCompletions
|
|
2918
|
-
}, {
|
|
2919
|
-
key: Enter,
|
|
2920
|
-
command: 'EditorCompletion.selectCurrent',
|
|
2921
|
-
when: FocusEditorCompletions
|
|
2922
|
-
}, {
|
|
2923
|
-
key: Escape,
|
|
2924
|
-
command: 'Editor.closeCompletion',
|
|
2925
|
-
when: FocusEditorCompletions
|
|
2926
|
-
}, {
|
|
2927
|
-
key: End,
|
|
2928
|
-
command: 'EditorCompletion.focusLast',
|
|
2929
|
-
when: FocusEditorCompletions
|
|
2930
|
-
}, {
|
|
2931
|
-
key: Home,
|
|
2932
|
-
command: 'EditorCompletion.focusFirst',
|
|
2933
|
-
when: FocusEditorCompletions
|
|
2934
|
-
}, {
|
|
2935
|
-
key: CtrlCmd | Space$1,
|
|
2936
|
-
command: 'EditorCompletion.toggleDetails',
|
|
2937
|
-
when: FocusEditorCompletions
|
|
2938
|
-
}, {
|
|
2939
|
-
key: CtrlCmd | RightArrow,
|
|
2940
|
-
command: 'Editor.cursorWordRight',
|
|
2941
|
-
when: FocusEditorText
|
|
2942
|
-
}, {
|
|
2943
|
-
key: CtrlCmd | LeftArrow,
|
|
2944
|
-
command: 'Editor.cursorWordLeft',
|
|
2945
|
-
when: FocusEditorText
|
|
2946
|
-
}, {
|
|
2947
|
-
key: Alt$1 | Backspace,
|
|
2948
|
-
command: 'Editor.deleteWordPartLeft',
|
|
2949
|
-
when: FocusEditorText
|
|
2950
|
-
}, {
|
|
2951
|
-
key: Alt$1 | Delete,
|
|
2952
|
-
command: 'Editor.deleteWordPartRight',
|
|
2953
|
-
when: FocusEditorText
|
|
2954
|
-
}, {
|
|
2955
|
-
key: CtrlCmd | Backspace,
|
|
2956
|
-
command: 'Editor.deleteWordLeft',
|
|
2957
|
-
when: FocusEditorText
|
|
2958
|
-
}, {
|
|
2959
|
-
key: CtrlCmd | Delete,
|
|
2960
|
-
command: 'Editor.deleteWordRight',
|
|
2961
|
-
when: FocusEditorText
|
|
2962
|
-
}, {
|
|
2963
|
-
key: CtrlCmd | KeyD,
|
|
2964
|
-
command: 'Editor.selectNextOccurrence',
|
|
2965
|
-
when: FocusEditorText
|
|
2966
|
-
}, {
|
|
2967
|
-
key: CtrlCmd | KeyJ,
|
|
2968
|
-
command: 'Editor.openColorPicker',
|
|
2969
|
-
when: FocusEditorText
|
|
2970
|
-
}, {
|
|
2971
|
-
key: CtrlCmd | Period,
|
|
2972
|
-
command: 'Editor.showSourceActions2',
|
|
2973
|
-
when: FocusEditorText
|
|
2974
|
-
}, {
|
|
2975
|
-
key: Tab,
|
|
2976
|
-
command: 'Editor.handleTab',
|
|
2977
|
-
when: FocusEditorText
|
|
2978
|
-
}, {
|
|
2979
|
-
key: Shift | Tab,
|
|
2980
|
-
command: 'Editor.unindent',
|
|
2981
|
-
when: FocusEditorText
|
|
2982
|
-
}, {
|
|
2983
|
-
key: CtrlCmd | BracketLeft,
|
|
2984
|
-
command: 'Editor.indentLess',
|
|
2985
|
-
when: FocusEditorText
|
|
2986
|
-
}, {
|
|
2987
|
-
key: Escape,
|
|
2988
|
-
command: 'Editor.closeFind',
|
|
2989
|
-
when: FocusFindWidget
|
|
2990
|
-
}, {
|
|
2991
|
-
key: CtrlCmd | KeyF,
|
|
2992
|
-
command: 'Editor.openFind2',
|
|
2993
|
-
when: FocusEditorText
|
|
2994
|
-
}, {
|
|
2995
|
-
key: CtrlCmd | KeyK,
|
|
2996
|
-
command: 'Editor.openCodeGenerator',
|
|
2997
|
-
when: FocusEditorText
|
|
2998
|
-
}, {
|
|
2999
|
-
key: Escape,
|
|
3000
|
-
command: 'Editor.closeCodeGenerator',
|
|
3001
|
-
when: FocusEditorCodeGenerator
|
|
3002
|
-
}, {
|
|
3003
|
-
key: Enter,
|
|
3004
|
-
command: 'EditorCodeGenerator.accept',
|
|
3005
|
-
when: FocusEditorCodeGenerator
|
|
3006
|
-
}, {
|
|
3007
|
-
key: CtrlCmd | BracketRight,
|
|
3008
|
-
command: 'Editor.indentMore',
|
|
3009
|
-
when: FocusEditorText
|
|
3010
|
-
}, {
|
|
3011
|
-
key: Shift | LeftArrow,
|
|
3012
|
-
command: 'Editor.selectCharacterLeft',
|
|
3013
|
-
when: FocusEditorText
|
|
3014
|
-
}, {
|
|
3015
|
-
key: CtrlCmd | Shift | LeftArrow,
|
|
3016
|
-
command: 'Editor.selectWordLeft',
|
|
3017
|
-
when: FocusEditorText
|
|
3018
|
-
}, {
|
|
3019
|
-
key: Shift | RightArrow,
|
|
3020
|
-
command: 'Editor.selectCharacterRight',
|
|
3021
|
-
when: FocusEditorText
|
|
3022
|
-
}, {
|
|
3023
|
-
key: CtrlCmd | Shift | RightArrow,
|
|
3024
|
-
command: 'Editor.selectWordRight',
|
|
3025
|
-
when: FocusEditorText
|
|
3026
|
-
}, {
|
|
3027
|
-
key: CtrlCmd | KeyL,
|
|
3028
|
-
command: 'Editor.selectLine',
|
|
3029
|
-
when: FocusEditorText
|
|
3030
|
-
}, {
|
|
3031
|
-
key: CtrlCmd | Shift | Backspace,
|
|
3032
|
-
command: 'Editor.deleteAllLeft',
|
|
3033
|
-
when: FocusEditorText
|
|
3034
|
-
}, {
|
|
3035
|
-
key: CtrlCmd | Shift | Delete,
|
|
3036
|
-
command: 'Editor.deleteAllRight',
|
|
3037
|
-
when: FocusEditorText
|
|
3038
|
-
}, {
|
|
3039
|
-
key: Escape,
|
|
3040
|
-
command: 'Editor.cancelSelection',
|
|
3041
|
-
when: FocusEditorText
|
|
3042
|
-
}, {
|
|
3043
|
-
key: CtrlCmd | KeyZ,
|
|
3044
|
-
command: 'Editor.undo',
|
|
3045
|
-
when: FocusEditorText
|
|
3046
|
-
}, {
|
|
3047
|
-
key: LeftArrow,
|
|
3048
|
-
command: 'Editor.cursorLeft',
|
|
3049
|
-
when: FocusEditorText
|
|
3050
|
-
}, {
|
|
3051
|
-
key: RightArrow,
|
|
3052
|
-
command: 'Editor.cursorRight',
|
|
3053
|
-
when: FocusEditorText
|
|
3054
|
-
}, {
|
|
3055
|
-
key: UpArrow,
|
|
3056
|
-
command: 'Editor.cursorUp',
|
|
3057
|
-
when: FocusEditorText
|
|
3058
|
-
}, {
|
|
3059
|
-
key: DownArrow,
|
|
3060
|
-
command: 'Editor.cursorDown',
|
|
3061
|
-
when: FocusEditorText
|
|
3062
|
-
}, {
|
|
3063
|
-
key: Backspace,
|
|
3064
|
-
command: 'Editor.deleteLeft',
|
|
3065
|
-
when: FocusEditorText
|
|
3066
|
-
}, {
|
|
3067
|
-
key: Delete,
|
|
3068
|
-
command: 'Editor.deleteRight',
|
|
3069
|
-
when: FocusEditorText
|
|
3070
|
-
}, {
|
|
3071
|
-
key: Enter,
|
|
3072
|
-
command: 'Editor.insertLineBreak',
|
|
3073
|
-
when: FocusEditorText
|
|
3074
|
-
}, {
|
|
3075
|
-
key: CtrlCmd | Shift | KeyD,
|
|
3076
|
-
command: 'Editor.copyLineDown',
|
|
3077
|
-
when: FocusEditorText
|
|
3078
|
-
}, {
|
|
3079
|
-
key: CtrlCmd | Shift | DownArrow,
|
|
3080
|
-
command: 'Editor.moveLineDown',
|
|
3081
|
-
when: FocusEditorText
|
|
3082
|
-
}, {
|
|
3083
|
-
key: CtrlCmd | Shift | UpArrow,
|
|
3084
|
-
command: 'Editor.moveLineUp',
|
|
3085
|
-
when: FocusEditorText
|
|
3086
|
-
}, {
|
|
3087
|
-
key: CtrlCmd | Space$1,
|
|
3088
|
-
command: 'Editor.openCompletion',
|
|
3089
|
-
when: FocusEditorText
|
|
3090
|
-
}, {
|
|
3091
|
-
key: F2,
|
|
3092
|
-
command: 'Editor.openRename',
|
|
3093
|
-
when: FocusEditorText
|
|
3094
|
-
}, {
|
|
3095
|
-
key: Enter,
|
|
3096
|
-
command: 'EditorRename.accept',
|
|
3097
|
-
when: FocusEditorRename
|
|
3098
|
-
}, {
|
|
3099
|
-
key: Escape,
|
|
3100
|
-
command: 'Editor.closeRename',
|
|
3101
|
-
when: FocusEditorRename
|
|
3102
|
-
}, {
|
|
3103
|
-
key: Home,
|
|
3104
|
-
command: 'Editor.cursorHome',
|
|
3105
|
-
when: FocusEditorText
|
|
3106
|
-
}, {
|
|
3107
|
-
key: End,
|
|
3108
|
-
command: 'Editor.cursorEnd',
|
|
3109
|
-
when: FocusEditorText
|
|
3110
|
-
}, {
|
|
3111
|
-
key: CtrlCmd | Slash$1,
|
|
3112
|
-
command: 'Editor.toggleComment',
|
|
3113
|
-
when: FocusEditorText
|
|
3114
|
-
}, {
|
|
3115
|
-
key: CtrlCmd | KeyC,
|
|
3116
|
-
command: 'Editor.copy',
|
|
3117
|
-
when: FocusEditorText
|
|
3118
|
-
}, {
|
|
3119
|
-
key: CtrlCmd | KeyA,
|
|
3120
|
-
command: 'Editor.selectAll',
|
|
3121
|
-
when: FocusEditorText
|
|
3122
|
-
}, {
|
|
3123
|
-
key: CtrlCmd | KeyH,
|
|
3124
|
-
command: 'Editor.showHover2',
|
|
3125
|
-
when: FocusEditorText
|
|
3126
|
-
}, {
|
|
3127
|
-
key: CtrlCmd | KeyX,
|
|
3128
|
-
command: 'Editor.cut',
|
|
3129
|
-
when: FocusEditorText
|
|
3130
|
-
}, {
|
|
3131
|
-
key: CtrlCmd | KeyV,
|
|
3132
|
-
command: 'Editor.paste',
|
|
3133
|
-
when: FocusEditorText
|
|
3134
|
-
}, {
|
|
3135
|
-
key: Alt$1 | LeftArrow,
|
|
3136
|
-
command: 'Editor.cursorWordPartLeft',
|
|
3137
|
-
when: FocusEditorText
|
|
3138
|
-
}, {
|
|
3139
|
-
key: Alt$1 | RightArrow,
|
|
3140
|
-
command: 'Editor.cursorWordPartRight',
|
|
3141
|
-
when: FocusEditorText
|
|
3142
|
-
}, {
|
|
3143
|
-
key: Alt$1 | F3,
|
|
3144
|
-
command: 'Editor.selectAllOccurrences',
|
|
3145
|
-
when: FocusEditorText
|
|
3146
|
-
}, {
|
|
3147
|
-
key: Alt$1 | Shift | UpArrow,
|
|
3148
|
-
command: 'Editor.addCursorAbove',
|
|
3149
|
-
when: FocusEditorText
|
|
3150
|
-
}, {
|
|
3151
|
-
key: Alt$1 | Shift | DownArrow,
|
|
3152
|
-
command: 'Editor.addCursorBelow',
|
|
3153
|
-
when: FocusEditorText
|
|
3154
|
-
}, {
|
|
3155
|
-
key: Alt$1 | Shift | F12,
|
|
3156
|
-
command: 'Editor.findAllReferences',
|
|
3157
|
-
when: FocusEditorText
|
|
3158
|
-
}, {
|
|
3159
|
-
key: Alt$1 | Shift | KeyO,
|
|
3160
|
-
command: 'Editor.organizeImports',
|
|
3161
|
-
when: FocusEditorText
|
|
3162
|
-
}, {
|
|
3163
|
-
key: CtrlCmd | Shift | Space$1,
|
|
3164
|
-
command: 'Editor.selectionGrow',
|
|
3165
|
-
when: FocusEditor
|
|
3166
|
-
}];
|
|
3167
|
-
};
|
|
3168
|
-
|
|
3169
|
-
const copyLineUp = editor => {
|
|
3170
|
-
const {
|
|
3171
|
-
selections
|
|
3172
|
-
} = editor;
|
|
3173
|
-
const rowIndex = selections[0];
|
|
3174
|
-
const position = {
|
|
3175
|
-
rowIndex: rowIndex,
|
|
3176
|
-
columnIndex: 0
|
|
3177
|
-
};
|
|
3178
|
-
const changes = [{
|
|
3179
|
-
start: position,
|
|
3180
|
-
end: position,
|
|
3181
|
-
inserted: [getLine(editor, rowIndex), ''],
|
|
3182
|
-
deleted: ['']
|
|
3183
|
-
}];
|
|
3184
|
-
return scheduleDocumentAndCursorsSelections(editor, changes);
|
|
3185
|
-
};
|
|
3186
|
-
|
|
3187
|
-
// @ts-ignore
|
|
3188
|
-
const editorGetPositionLeft = (rowIndex, columnIndex, lines, getDelta) => {
|
|
3189
|
-
if (columnIndex === 0) {
|
|
3190
|
-
if (rowIndex === 0) {
|
|
3191
|
-
return {
|
|
3192
|
-
rowIndex: 0,
|
|
3193
|
-
columnIndex: 0
|
|
3194
|
-
};
|
|
3195
|
-
}
|
|
3196
|
-
return {
|
|
3197
|
-
rowIndex: rowIndex - 1,
|
|
3198
|
-
columnIndex: lines[rowIndex - 1].length
|
|
3199
|
-
};
|
|
3200
|
-
}
|
|
3201
|
-
const delta = getDelta(lines[rowIndex], columnIndex);
|
|
3202
|
-
return {
|
|
3203
|
-
rowIndex,
|
|
3204
|
-
columnIndex: columnIndex - delta
|
|
3205
|
-
};
|
|
3206
|
-
};
|
|
3207
|
-
|
|
3208
|
-
// @ts-ignore
|
|
3209
|
-
const moveToPositionEqual = (selections, i, rowIndex, columnIndex) => {
|
|
3210
|
-
selections[i] = rowIndex;
|
|
3211
|
-
selections[i + 1] = columnIndex;
|
|
3212
|
-
};
|
|
2805
|
+
// @ts-ignore
|
|
2806
|
+
const moveToPositionEqual = (selections, i, rowIndex, columnIndex) => {
|
|
2807
|
+
selections[i] = rowIndex;
|
|
2808
|
+
selections[i + 1] = columnIndex;
|
|
2809
|
+
};
|
|
3213
2810
|
|
|
3214
2811
|
// @ts-ignore
|
|
3215
2812
|
const moveRangeToPosition = (selections, i, rowIndex, columnIndex) => {
|
|
@@ -3856,19 +3453,56 @@ const i18nString = (key, placeholders = emptyObject) => {
|
|
|
3856
3453
|
};
|
|
3857
3454
|
|
|
3858
3455
|
const UiStrings$1 = {
|
|
3456
|
+
Copy: 'Copy',
|
|
3457
|
+
CopyLineDown: 'Copy Line Down',
|
|
3458
|
+
CopyLineUp: 'Copy Line Up',
|
|
3459
|
+
Cut: 'Cut',
|
|
3460
|
+
DuplicateSelection: 'Duplicate Selection',
|
|
3461
|
+
EditorCloseColorPicker: 'Editor: Close Color Picker',
|
|
3462
|
+
EditorCopyLineDown: 'Editor: Copy Line Down',
|
|
3463
|
+
EditorCopyLineUp: 'Editor: Copy Line Up',
|
|
3464
|
+
EditorFormatDocumentForced: 'Editor: Format Document (forced)',
|
|
3465
|
+
EditorGoToDefinition: 'Editor: Go To Definition',
|
|
3466
|
+
EditorGoToTypeDefinition: 'Editor: Go To Type Definition',
|
|
3467
|
+
EditorIndent: 'Editor: Indent',
|
|
3468
|
+
EditorOpenColorPicker: 'Editor: Open Color Picker',
|
|
3469
|
+
EditorSelectAllOccurrences: 'Editor: Select All Occurrences',
|
|
3470
|
+
EditorSelectDown: 'Editor: Select Down',
|
|
3471
|
+
EditorSelectInsideString: 'Editor: Select Inside String',
|
|
3472
|
+
EditorSelectNextOccurrence: 'Editor: Select Next Occurrence',
|
|
3473
|
+
EditorSelectUp: 'Editor: Select Up',
|
|
3474
|
+
EditorShowHover: 'Show Hover',
|
|
3475
|
+
EditorSortLinesAscending: 'Editor: Sort Lines Ascending',
|
|
3476
|
+
EditorToggleBlockComment: 'Editor: Toggle Block Comment',
|
|
3477
|
+
EditorToggleComment: 'Editor: Toggle Comment',
|
|
3478
|
+
EditorUnindent: 'Editor: Unindent',
|
|
3479
|
+
EnterCode: 'Enter Code',
|
|
3480
|
+
EscapeToClose: 'Escape to close',
|
|
3481
|
+
FindAllImplementations: 'Find All Implementations',
|
|
3482
|
+
FindAllReferences: 'Find All References',
|
|
3483
|
+
FormatDocument: 'Format Document',
|
|
3859
3484
|
GoToDefinition: 'Go to Definition',
|
|
3485
|
+
GoToTypeDefinition: 'Go to Type Definition',
|
|
3486
|
+
MoveLineDown: 'Move Line Down',
|
|
3487
|
+
MoveLineUp: 'Move Line Up',
|
|
3488
|
+
NoCodeActionsAvailable: 'No code actions available',
|
|
3860
3489
|
NoDefinitionFound: 'No definition found',
|
|
3861
3490
|
NoDefinitionFoundFor: "No definition found for '{PH1}'",
|
|
3491
|
+
NoResults: 'No Results',
|
|
3862
3492
|
NoTypeDefinitionFound: 'No type definition found',
|
|
3863
3493
|
NoTypeDefinitionFoundFor: "No type definition found for '{PH1}'",
|
|
3864
|
-
NoResults: 'No Results',
|
|
3865
|
-
Replace: 'Replace',
|
|
3866
|
-
SourceAction: 'Source Action',
|
|
3867
3494
|
OrganizeImports: 'Organize Imports',
|
|
3495
|
+
Paste: 'Paste',
|
|
3496
|
+
Redo: 'Redo',
|
|
3497
|
+
Replace: 'Replace',
|
|
3498
|
+
SelectAll: 'Select All',
|
|
3499
|
+
Separator: 'Separator',
|
|
3868
3500
|
SortImports: 'Sort Imports',
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3501
|
+
SourceAction: 'Source Action',
|
|
3502
|
+
SourceActions: 'Source Actions',
|
|
3503
|
+
ToggleBlockComment: 'Toggle Block Comment',
|
|
3504
|
+
ToggleLineComment: 'Toggle Line Comment',
|
|
3505
|
+
Undo: 'Undo'
|
|
3872
3506
|
};
|
|
3873
3507
|
const noDefinitionFound = () => {
|
|
3874
3508
|
return i18nString(UiStrings$1.NoDefinitionFound);
|
|
@@ -3901,6 +3535,69 @@ const escapeToClose = () => {
|
|
|
3901
3535
|
const enterCode = () => {
|
|
3902
3536
|
return i18nString(UiStrings$1.EnterCode);
|
|
3903
3537
|
};
|
|
3538
|
+
const toggleBlockComment$1 = () => {
|
|
3539
|
+
return i18nString(UiStrings$1.ToggleBlockComment);
|
|
3540
|
+
};
|
|
3541
|
+
const moveLineUp$1 = () => {
|
|
3542
|
+
return i18nString(UiStrings$1.MoveLineUp);
|
|
3543
|
+
};
|
|
3544
|
+
const moveLineDown$1 = () => {
|
|
3545
|
+
return i18nString(UiStrings$1.MoveLineDown);
|
|
3546
|
+
};
|
|
3547
|
+
const formatDocument = () => {
|
|
3548
|
+
return i18nString(UiStrings$1.FormatDocument);
|
|
3549
|
+
};
|
|
3550
|
+
const editorShowHover = () => {
|
|
3551
|
+
return i18nString(UiStrings$1.EditorShowHover);
|
|
3552
|
+
};
|
|
3553
|
+
const editorFormatDocumentForced = () => {
|
|
3554
|
+
return i18nString(UiStrings$1.EditorFormatDocumentForced);
|
|
3555
|
+
};
|
|
3556
|
+
const editorSelectNextOccurrence = () => {
|
|
3557
|
+
return i18nString(UiStrings$1.EditorSelectNextOccurrence);
|
|
3558
|
+
};
|
|
3559
|
+
const editorSelectAllOccurrences = () => {
|
|
3560
|
+
return i18nString(UiStrings$1.EditorSelectAllOccurrences);
|
|
3561
|
+
};
|
|
3562
|
+
const editorGoToDefinition = () => {
|
|
3563
|
+
return i18nString(UiStrings$1.EditorGoToDefinition);
|
|
3564
|
+
};
|
|
3565
|
+
const editorGoToTypeDefinition = () => {
|
|
3566
|
+
return i18nString(UiStrings$1.EditorGoToTypeDefinition);
|
|
3567
|
+
};
|
|
3568
|
+
const editorSelectInsideString = () => {
|
|
3569
|
+
return i18nString(UiStrings$1.EditorSelectInsideString);
|
|
3570
|
+
};
|
|
3571
|
+
const editorIndent = () => {
|
|
3572
|
+
return i18nString(UiStrings$1.EditorIndent);
|
|
3573
|
+
};
|
|
3574
|
+
const editorUnindent$1 = () => {
|
|
3575
|
+
return i18nString(UiStrings$1.EditorUnindent);
|
|
3576
|
+
};
|
|
3577
|
+
const editorSortLinesAscending = () => {
|
|
3578
|
+
return i18nString(UiStrings$1.EditorSortLinesAscending);
|
|
3579
|
+
};
|
|
3580
|
+
const editorToggleComment = () => {
|
|
3581
|
+
return i18nString(UiStrings$1.EditorToggleComment);
|
|
3582
|
+
};
|
|
3583
|
+
const editorSelectUp = () => {
|
|
3584
|
+
return i18nString(UiStrings$1.EditorSelectUp);
|
|
3585
|
+
};
|
|
3586
|
+
const editorSelectDown = () => {
|
|
3587
|
+
return i18nString(UiStrings$1.EditorSelectDown);
|
|
3588
|
+
};
|
|
3589
|
+
const editorOpenColorPicker = () => {
|
|
3590
|
+
return i18nString(UiStrings$1.EditorOpenColorPicker);
|
|
3591
|
+
};
|
|
3592
|
+
const editorCloseColorPicker = () => {
|
|
3593
|
+
return i18nString(UiStrings$1.EditorCloseColorPicker);
|
|
3594
|
+
};
|
|
3595
|
+
const editorCopyLineDown = () => {
|
|
3596
|
+
return i18nString(UiStrings$1.EditorCopyLineDown);
|
|
3597
|
+
};
|
|
3598
|
+
const editorCopyLineUp = () => {
|
|
3599
|
+
return i18nString(UiStrings$1.EditorCopyLineUp);
|
|
3600
|
+
};
|
|
3904
3601
|
|
|
3905
3602
|
// @ts-ignore
|
|
3906
3603
|
const goTo = async ({
|
|
@@ -4124,7 +3821,7 @@ const setPosition$1 = position => {
|
|
|
4124
3821
|
};
|
|
4125
3822
|
|
|
4126
3823
|
const Ctrl = 1;
|
|
4127
|
-
const Alt = 2;
|
|
3824
|
+
const Alt$1 = 2;
|
|
4128
3825
|
|
|
4129
3826
|
// TODO first change cursor position, then run go to definition
|
|
4130
3827
|
// cursor should appear at mousedown position immediately
|
|
@@ -4175,7 +3872,7 @@ const handleSingleClickDefault = (editor, position) => {
|
|
|
4175
3872
|
};
|
|
4176
3873
|
const getFn = modifier => {
|
|
4177
3874
|
switch (modifier) {
|
|
4178
|
-
case Alt:
|
|
3875
|
+
case Alt$1:
|
|
4179
3876
|
return handleSingleClickWithAlt;
|
|
4180
3877
|
case Ctrl:
|
|
4181
3878
|
return handleSingleClickWithCtrl;
|
|
@@ -5198,7 +4895,7 @@ const EmptyMatches$1 = [];
|
|
|
5198
4895
|
const Dash = '-';
|
|
5199
4896
|
const Dot = '.';
|
|
5200
4897
|
const EmptyString = '';
|
|
5201
|
-
const Space = ' ';
|
|
4898
|
+
const Space$1 = ' ';
|
|
5202
4899
|
const Underline = '_';
|
|
5203
4900
|
const T = 't';
|
|
5204
4901
|
const isLowerCase = char => {
|
|
@@ -5215,7 +4912,7 @@ const isGap = (columnCharBefore, columnChar) => {
|
|
|
5215
4912
|
case Underline:
|
|
5216
4913
|
case EmptyString:
|
|
5217
4914
|
case T:
|
|
5218
|
-
case Space:
|
|
4915
|
+
case Space$1:
|
|
5219
4916
|
case Dot:
|
|
5220
4917
|
return true;
|
|
5221
4918
|
}
|
|
@@ -7829,7 +7526,7 @@ const type = (editor, text) => {
|
|
|
7829
7526
|
return scheduleDocumentAndCursorsSelections(editor, changes);
|
|
7830
7527
|
};
|
|
7831
7528
|
|
|
7832
|
-
const Slash = '/';
|
|
7529
|
+
const Slash$1 = '/';
|
|
7833
7530
|
|
|
7834
7531
|
const CurlyOpen = '{';
|
|
7835
7532
|
const CurlyClose = '}';
|
|
@@ -7943,7 +7640,7 @@ const typeWithAutoClosing = async (editor, text) => {
|
|
|
7943
7640
|
}
|
|
7944
7641
|
break;
|
|
7945
7642
|
// case AutoClosing.ClosingAngleBracket: // TODO support auto closing when typing closing angle bracket of start tag
|
|
7946
|
-
case Slash:
|
|
7643
|
+
case Slash$1:
|
|
7947
7644
|
if (isAutoClosingTagsEnabled) {
|
|
7948
7645
|
return typeWithAutoClosingTag(editor, text);
|
|
7949
7646
|
}
|
|
@@ -8799,6 +8496,481 @@ const ensure = async (fontName, fontUrl) => {
|
|
|
8799
8496
|
setLoaded(fontName);
|
|
8800
8497
|
};
|
|
8801
8498
|
|
|
8499
|
+
const Backspace = 1;
|
|
8500
|
+
const Tab = 2;
|
|
8501
|
+
const Enter = 3;
|
|
8502
|
+
const Escape = 8;
|
|
8503
|
+
const Space = 9;
|
|
8504
|
+
const End = 255;
|
|
8505
|
+
const Home = 12;
|
|
8506
|
+
const LeftArrow = 13;
|
|
8507
|
+
const UpArrow = 14;
|
|
8508
|
+
const RightArrow = 15;
|
|
8509
|
+
const DownArrow = 16;
|
|
8510
|
+
const Delete = 18;
|
|
8511
|
+
const KeyA = 29;
|
|
8512
|
+
const KeyC = 31;
|
|
8513
|
+
const KeyD = 32;
|
|
8514
|
+
const KeyF = 34;
|
|
8515
|
+
const KeyH = 36;
|
|
8516
|
+
const KeyJ = 38;
|
|
8517
|
+
const KeyK = 39;
|
|
8518
|
+
const KeyL = 40;
|
|
8519
|
+
const KeyO = 43;
|
|
8520
|
+
const KeyV = 50;
|
|
8521
|
+
const KeyX = 52;
|
|
8522
|
+
const KeyZ = 54;
|
|
8523
|
+
const F2 = 58;
|
|
8524
|
+
const F3 = 59;
|
|
8525
|
+
const F4 = 60;
|
|
8526
|
+
const F12 = 68;
|
|
8527
|
+
const Period = 87;
|
|
8528
|
+
const Slash = 88;
|
|
8529
|
+
const BracketLeft = 90;
|
|
8530
|
+
const BracketRight = 92;
|
|
8531
|
+
|
|
8532
|
+
const CtrlCmd = 1 << 11 >>> 0;
|
|
8533
|
+
const Shift = 1 << 10 >>> 0;
|
|
8534
|
+
const Alt = 1 << 9 >>> 0;
|
|
8535
|
+
|
|
8536
|
+
const FocusEditor = 12;
|
|
8537
|
+
const FocusEditorCompletions = 9;
|
|
8538
|
+
const FocusEditorRename = 11;
|
|
8539
|
+
const FocusEditorText = 12;
|
|
8540
|
+
const FocusFindWidget = 16;
|
|
8541
|
+
const FocusSourceActions = 38;
|
|
8542
|
+
const FocusFindWidgetReplace = 43;
|
|
8543
|
+
const FocusFindWidgetReplaceButton = 46;
|
|
8544
|
+
const FocusFindWidgetReplaceAllButton = 47;
|
|
8545
|
+
const FocusFindWidgetCloseButton = 48;
|
|
8546
|
+
const FocusFindWidgetNextMatchButton = 49;
|
|
8547
|
+
const FocusFindWidgetPreviousMatchButton = 50;
|
|
8548
|
+
const FocusEditorCodeGenerator = 52;
|
|
8549
|
+
|
|
8550
|
+
const getKeyBindings = () => {
|
|
8551
|
+
return [{
|
|
8552
|
+
key: Escape,
|
|
8553
|
+
command: 'Editor.closeSourceAction',
|
|
8554
|
+
when: FocusSourceActions
|
|
8555
|
+
}, {
|
|
8556
|
+
key: DownArrow,
|
|
8557
|
+
command: 'EditorSourceActions.focusNext',
|
|
8558
|
+
when: FocusSourceActions
|
|
8559
|
+
}, {
|
|
8560
|
+
key: UpArrow,
|
|
8561
|
+
command: 'EditorSourceActions.focusPrevious',
|
|
8562
|
+
when: FocusSourceActions
|
|
8563
|
+
}, {
|
|
8564
|
+
key: Home,
|
|
8565
|
+
command: 'EditorSourceActions.focusFirst',
|
|
8566
|
+
when: FocusSourceActions
|
|
8567
|
+
}, {
|
|
8568
|
+
key: End,
|
|
8569
|
+
command: 'EditorSourceActions.focusLast',
|
|
8570
|
+
when: FocusSourceActions
|
|
8571
|
+
}, {
|
|
8572
|
+
key: Enter,
|
|
8573
|
+
command: 'EditorSourceActions.selectCurrent',
|
|
8574
|
+
when: FocusSourceActions
|
|
8575
|
+
}, {
|
|
8576
|
+
key: Enter,
|
|
8577
|
+
command: 'FindWidget.focusNext',
|
|
8578
|
+
when: FocusFindWidget
|
|
8579
|
+
}, {
|
|
8580
|
+
key: Shift | F4,
|
|
8581
|
+
command: 'FindWidget.focusPrevious',
|
|
8582
|
+
when: FocusFindWidget
|
|
8583
|
+
}, {
|
|
8584
|
+
key: F4,
|
|
8585
|
+
command: 'FindWidget.focusNext',
|
|
8586
|
+
when: FocusFindWidget
|
|
8587
|
+
}, {
|
|
8588
|
+
key: Shift | Tab,
|
|
8589
|
+
command: 'FindWidget.focusToggleReplace',
|
|
8590
|
+
when: FocusFindWidget
|
|
8591
|
+
}, {
|
|
8592
|
+
key: Tab,
|
|
8593
|
+
command: 'FindWidget.focusReplace',
|
|
8594
|
+
when: FocusFindWidget
|
|
8595
|
+
}, {
|
|
8596
|
+
key: Tab,
|
|
8597
|
+
command: 'FindWidget.focusPreviousMatchButton',
|
|
8598
|
+
when: FocusFindWidgetReplace
|
|
8599
|
+
}, {
|
|
8600
|
+
key: Alt | CtrlCmd | Enter,
|
|
8601
|
+
command: 'FindWidget.replaceAll',
|
|
8602
|
+
when: FocusFindWidgetReplace
|
|
8603
|
+
}, {
|
|
8604
|
+
key: Tab,
|
|
8605
|
+
command: 'FindWidget.focusNextMatchButton',
|
|
8606
|
+
when: FocusFindWidgetPreviousMatchButton
|
|
8607
|
+
}, {
|
|
8608
|
+
key: Shift | Tab,
|
|
8609
|
+
command: 'FindWidget.focusReplace',
|
|
8610
|
+
when: FocusFindWidgetPreviousMatchButton
|
|
8611
|
+
}, {
|
|
8612
|
+
key: Shift | Tab,
|
|
8613
|
+
command: 'FindWidget.focusPreviousMatchButton',
|
|
8614
|
+
when: FocusFindWidgetNextMatchButton
|
|
8615
|
+
}, {
|
|
8616
|
+
key: Tab,
|
|
8617
|
+
command: 'FindWidget.focusCloseButton',
|
|
8618
|
+
when: FocusFindWidgetNextMatchButton
|
|
8619
|
+
}, {
|
|
8620
|
+
key: Shift | Tab,
|
|
8621
|
+
command: 'FindWidget.focusNextMatchButton',
|
|
8622
|
+
when: FocusFindWidgetCloseButton
|
|
8623
|
+
}, {
|
|
8624
|
+
key: Tab,
|
|
8625
|
+
command: 'FindWidget.focusReplaceButton',
|
|
8626
|
+
when: FocusFindWidgetCloseButton
|
|
8627
|
+
}, {
|
|
8628
|
+
key: Shift | Tab,
|
|
8629
|
+
command: 'FindWidget.focusFind',
|
|
8630
|
+
when: FocusFindWidgetReplace
|
|
8631
|
+
}, {
|
|
8632
|
+
key: Tab,
|
|
8633
|
+
command: 'FindWidget.focusReplaceAllButton',
|
|
8634
|
+
when: FocusFindWidgetReplaceButton
|
|
8635
|
+
}, {
|
|
8636
|
+
key: Shift | Tab,
|
|
8637
|
+
command: 'FindWidget.focusCloseButton',
|
|
8638
|
+
when: FocusFindWidgetReplaceButton
|
|
8639
|
+
}, {
|
|
8640
|
+
key: Shift | Tab,
|
|
8641
|
+
command: 'FindWidget.focusReplaceButton',
|
|
8642
|
+
when: FocusFindWidgetReplaceAllButton
|
|
8643
|
+
}, {
|
|
8644
|
+
key: DownArrow,
|
|
8645
|
+
command: 'EditorCompletion.focusNext',
|
|
8646
|
+
when: FocusEditorCompletions
|
|
8647
|
+
}, {
|
|
8648
|
+
key: UpArrow,
|
|
8649
|
+
command: 'EditorCompletion.focusPrevious',
|
|
8650
|
+
when: FocusEditorCompletions
|
|
8651
|
+
}, {
|
|
8652
|
+
key: Enter,
|
|
8653
|
+
command: 'EditorCompletion.selectCurrent',
|
|
8654
|
+
when: FocusEditorCompletions
|
|
8655
|
+
}, {
|
|
8656
|
+
key: Escape,
|
|
8657
|
+
command: 'Editor.closeCompletion',
|
|
8658
|
+
when: FocusEditorCompletions
|
|
8659
|
+
}, {
|
|
8660
|
+
key: End,
|
|
8661
|
+
command: 'EditorCompletion.focusLast',
|
|
8662
|
+
when: FocusEditorCompletions
|
|
8663
|
+
}, {
|
|
8664
|
+
key: Home,
|
|
8665
|
+
command: 'EditorCompletion.focusFirst',
|
|
8666
|
+
when: FocusEditorCompletions
|
|
8667
|
+
}, {
|
|
8668
|
+
key: CtrlCmd | Space,
|
|
8669
|
+
command: 'EditorCompletion.toggleDetails',
|
|
8670
|
+
when: FocusEditorCompletions
|
|
8671
|
+
}, {
|
|
8672
|
+
key: CtrlCmd | RightArrow,
|
|
8673
|
+
command: 'Editor.cursorWordRight',
|
|
8674
|
+
when: FocusEditorText
|
|
8675
|
+
}, {
|
|
8676
|
+
key: CtrlCmd | LeftArrow,
|
|
8677
|
+
command: 'Editor.cursorWordLeft',
|
|
8678
|
+
when: FocusEditorText
|
|
8679
|
+
}, {
|
|
8680
|
+
key: Alt | Backspace,
|
|
8681
|
+
command: 'Editor.deleteWordPartLeft',
|
|
8682
|
+
when: FocusEditorText
|
|
8683
|
+
}, {
|
|
8684
|
+
key: Alt | Delete,
|
|
8685
|
+
command: 'Editor.deleteWordPartRight',
|
|
8686
|
+
when: FocusEditorText
|
|
8687
|
+
}, {
|
|
8688
|
+
key: CtrlCmd | Backspace,
|
|
8689
|
+
command: 'Editor.deleteWordLeft',
|
|
8690
|
+
when: FocusEditorText
|
|
8691
|
+
}, {
|
|
8692
|
+
key: CtrlCmd | Delete,
|
|
8693
|
+
command: 'Editor.deleteWordRight',
|
|
8694
|
+
when: FocusEditorText
|
|
8695
|
+
}, {
|
|
8696
|
+
key: CtrlCmd | KeyD,
|
|
8697
|
+
command: 'Editor.selectNextOccurrence',
|
|
8698
|
+
when: FocusEditorText
|
|
8699
|
+
}, {
|
|
8700
|
+
key: CtrlCmd | KeyJ,
|
|
8701
|
+
command: 'Editor.openColorPicker',
|
|
8702
|
+
when: FocusEditorText
|
|
8703
|
+
}, {
|
|
8704
|
+
key: CtrlCmd | Period,
|
|
8705
|
+
command: 'Editor.showSourceActions2',
|
|
8706
|
+
when: FocusEditorText
|
|
8707
|
+
}, {
|
|
8708
|
+
key: Tab,
|
|
8709
|
+
command: 'Editor.handleTab',
|
|
8710
|
+
when: FocusEditorText
|
|
8711
|
+
}, {
|
|
8712
|
+
key: Shift | Tab,
|
|
8713
|
+
command: 'Editor.unindent',
|
|
8714
|
+
when: FocusEditorText
|
|
8715
|
+
}, {
|
|
8716
|
+
key: CtrlCmd | BracketLeft,
|
|
8717
|
+
command: 'Editor.indentLess',
|
|
8718
|
+
when: FocusEditorText
|
|
8719
|
+
}, {
|
|
8720
|
+
key: Escape,
|
|
8721
|
+
command: 'Editor.closeFind',
|
|
8722
|
+
when: FocusFindWidget
|
|
8723
|
+
}, {
|
|
8724
|
+
key: CtrlCmd | KeyF,
|
|
8725
|
+
command: 'Editor.openFind2',
|
|
8726
|
+
when: FocusEditorText
|
|
8727
|
+
}, {
|
|
8728
|
+
key: CtrlCmd | KeyK,
|
|
8729
|
+
command: 'Editor.openCodeGenerator',
|
|
8730
|
+
when: FocusEditorText
|
|
8731
|
+
}, {
|
|
8732
|
+
key: Escape,
|
|
8733
|
+
command: 'Editor.closeCodeGenerator',
|
|
8734
|
+
when: FocusEditorCodeGenerator
|
|
8735
|
+
}, {
|
|
8736
|
+
key: Enter,
|
|
8737
|
+
command: 'EditorCodeGenerator.accept',
|
|
8738
|
+
when: FocusEditorCodeGenerator
|
|
8739
|
+
}, {
|
|
8740
|
+
key: CtrlCmd | BracketRight,
|
|
8741
|
+
command: 'Editor.indentMore',
|
|
8742
|
+
when: FocusEditorText
|
|
8743
|
+
}, {
|
|
8744
|
+
key: Shift | LeftArrow,
|
|
8745
|
+
command: 'Editor.selectCharacterLeft',
|
|
8746
|
+
when: FocusEditorText
|
|
8747
|
+
}, {
|
|
8748
|
+
key: CtrlCmd | Shift | LeftArrow,
|
|
8749
|
+
command: 'Editor.selectWordLeft',
|
|
8750
|
+
when: FocusEditorText
|
|
8751
|
+
}, {
|
|
8752
|
+
key: Shift | RightArrow,
|
|
8753
|
+
command: 'Editor.selectCharacterRight',
|
|
8754
|
+
when: FocusEditorText
|
|
8755
|
+
}, {
|
|
8756
|
+
key: CtrlCmd | Shift | RightArrow,
|
|
8757
|
+
command: 'Editor.selectWordRight',
|
|
8758
|
+
when: FocusEditorText
|
|
8759
|
+
}, {
|
|
8760
|
+
key: CtrlCmd | KeyL,
|
|
8761
|
+
command: 'Editor.selectLine',
|
|
8762
|
+
when: FocusEditorText
|
|
8763
|
+
}, {
|
|
8764
|
+
key: CtrlCmd | Shift | Backspace,
|
|
8765
|
+
command: 'Editor.deleteAllLeft',
|
|
8766
|
+
when: FocusEditorText
|
|
8767
|
+
}, {
|
|
8768
|
+
key: CtrlCmd | Shift | Delete,
|
|
8769
|
+
command: 'Editor.deleteAllRight',
|
|
8770
|
+
when: FocusEditorText
|
|
8771
|
+
}, {
|
|
8772
|
+
key: Escape,
|
|
8773
|
+
command: 'Editor.cancelSelection',
|
|
8774
|
+
when: FocusEditorText
|
|
8775
|
+
}, {
|
|
8776
|
+
key: CtrlCmd | KeyZ,
|
|
8777
|
+
command: 'Editor.undo',
|
|
8778
|
+
when: FocusEditorText
|
|
8779
|
+
}, {
|
|
8780
|
+
key: LeftArrow,
|
|
8781
|
+
command: 'Editor.cursorLeft',
|
|
8782
|
+
when: FocusEditorText
|
|
8783
|
+
}, {
|
|
8784
|
+
key: RightArrow,
|
|
8785
|
+
command: 'Editor.cursorRight',
|
|
8786
|
+
when: FocusEditorText
|
|
8787
|
+
}, {
|
|
8788
|
+
key: UpArrow,
|
|
8789
|
+
command: 'Editor.cursorUp',
|
|
8790
|
+
when: FocusEditorText
|
|
8791
|
+
}, {
|
|
8792
|
+
key: DownArrow,
|
|
8793
|
+
command: 'Editor.cursorDown',
|
|
8794
|
+
when: FocusEditorText
|
|
8795
|
+
}, {
|
|
8796
|
+
key: Backspace,
|
|
8797
|
+
command: 'Editor.deleteLeft',
|
|
8798
|
+
when: FocusEditorText
|
|
8799
|
+
}, {
|
|
8800
|
+
key: Delete,
|
|
8801
|
+
command: 'Editor.deleteRight',
|
|
8802
|
+
when: FocusEditorText
|
|
8803
|
+
}, {
|
|
8804
|
+
key: Enter,
|
|
8805
|
+
command: 'Editor.insertLineBreak',
|
|
8806
|
+
when: FocusEditorText
|
|
8807
|
+
}, {
|
|
8808
|
+
key: CtrlCmd | Shift | KeyD,
|
|
8809
|
+
command: 'Editor.copyLineDown',
|
|
8810
|
+
when: FocusEditorText
|
|
8811
|
+
}, {
|
|
8812
|
+
key: CtrlCmd | Shift | DownArrow,
|
|
8813
|
+
command: 'Editor.moveLineDown',
|
|
8814
|
+
when: FocusEditorText
|
|
8815
|
+
}, {
|
|
8816
|
+
key: CtrlCmd | Shift | UpArrow,
|
|
8817
|
+
command: 'Editor.moveLineUp',
|
|
8818
|
+
when: FocusEditorText
|
|
8819
|
+
}, {
|
|
8820
|
+
key: CtrlCmd | Space,
|
|
8821
|
+
command: 'Editor.openCompletion',
|
|
8822
|
+
when: FocusEditorText
|
|
8823
|
+
}, {
|
|
8824
|
+
key: F2,
|
|
8825
|
+
command: 'Editor.openRename',
|
|
8826
|
+
when: FocusEditorText
|
|
8827
|
+
}, {
|
|
8828
|
+
key: Enter,
|
|
8829
|
+
command: 'EditorRename.accept',
|
|
8830
|
+
when: FocusEditorRename
|
|
8831
|
+
}, {
|
|
8832
|
+
key: Escape,
|
|
8833
|
+
command: 'Editor.closeRename',
|
|
8834
|
+
when: FocusEditorRename
|
|
8835
|
+
}, {
|
|
8836
|
+
key: Home,
|
|
8837
|
+
command: 'Editor.cursorHome',
|
|
8838
|
+
when: FocusEditorText
|
|
8839
|
+
}, {
|
|
8840
|
+
key: End,
|
|
8841
|
+
command: 'Editor.cursorEnd',
|
|
8842
|
+
when: FocusEditorText
|
|
8843
|
+
}, {
|
|
8844
|
+
key: CtrlCmd | Slash,
|
|
8845
|
+
command: 'Editor.toggleComment',
|
|
8846
|
+
when: FocusEditorText
|
|
8847
|
+
}, {
|
|
8848
|
+
key: CtrlCmd | KeyC,
|
|
8849
|
+
command: 'Editor.copy',
|
|
8850
|
+
when: FocusEditorText
|
|
8851
|
+
}, {
|
|
8852
|
+
key: CtrlCmd | KeyA,
|
|
8853
|
+
command: 'Editor.selectAll',
|
|
8854
|
+
when: FocusEditorText
|
|
8855
|
+
}, {
|
|
8856
|
+
key: CtrlCmd | KeyH,
|
|
8857
|
+
command: 'Editor.showHover2',
|
|
8858
|
+
when: FocusEditorText
|
|
8859
|
+
}, {
|
|
8860
|
+
key: CtrlCmd | KeyX,
|
|
8861
|
+
command: 'Editor.cut',
|
|
8862
|
+
when: FocusEditorText
|
|
8863
|
+
}, {
|
|
8864
|
+
key: CtrlCmd | KeyV,
|
|
8865
|
+
command: 'Editor.paste',
|
|
8866
|
+
when: FocusEditorText
|
|
8867
|
+
}, {
|
|
8868
|
+
key: Alt | LeftArrow,
|
|
8869
|
+
command: 'Editor.cursorWordPartLeft',
|
|
8870
|
+
when: FocusEditorText
|
|
8871
|
+
}, {
|
|
8872
|
+
key: Alt | RightArrow,
|
|
8873
|
+
command: 'Editor.cursorWordPartRight',
|
|
8874
|
+
when: FocusEditorText
|
|
8875
|
+
}, {
|
|
8876
|
+
key: Alt | F3,
|
|
8877
|
+
command: 'Editor.selectAllOccurrences',
|
|
8878
|
+
when: FocusEditorText
|
|
8879
|
+
}, {
|
|
8880
|
+
key: Alt | Shift | UpArrow,
|
|
8881
|
+
command: 'Editor.addCursorAbove',
|
|
8882
|
+
when: FocusEditorText
|
|
8883
|
+
}, {
|
|
8884
|
+
key: Alt | Shift | DownArrow,
|
|
8885
|
+
command: 'Editor.addCursorBelow',
|
|
8886
|
+
when: FocusEditorText
|
|
8887
|
+
}, {
|
|
8888
|
+
key: Alt | Shift | F12,
|
|
8889
|
+
command: 'Editor.findAllReferences',
|
|
8890
|
+
when: FocusEditorText
|
|
8891
|
+
}, {
|
|
8892
|
+
key: Alt | Shift | KeyO,
|
|
8893
|
+
command: 'Editor.organizeImports',
|
|
8894
|
+
when: FocusEditorText
|
|
8895
|
+
}, {
|
|
8896
|
+
key: CtrlCmd | Shift | Space,
|
|
8897
|
+
command: 'Editor.selectionGrow',
|
|
8898
|
+
when: FocusEditor
|
|
8899
|
+
}];
|
|
8900
|
+
};
|
|
8901
|
+
|
|
8902
|
+
const getQuickPickMenuEntries = () => {
|
|
8903
|
+
return [{
|
|
8904
|
+
id: 'Editor.format',
|
|
8905
|
+
label: formatDocument()
|
|
8906
|
+
}, {
|
|
8907
|
+
id: 'Editor.showHover',
|
|
8908
|
+
label: editorShowHover()
|
|
8909
|
+
}, {
|
|
8910
|
+
id: 'Editor.formatForced',
|
|
8911
|
+
label: editorFormatDocumentForced()
|
|
8912
|
+
}, {
|
|
8913
|
+
id: 'Editor.selectNextOccurrence',
|
|
8914
|
+
label: editorSelectNextOccurrence()
|
|
8915
|
+
}, {
|
|
8916
|
+
id: 'Editor.selectAllOccurrences',
|
|
8917
|
+
label: editorSelectAllOccurrences()
|
|
8918
|
+
}, {
|
|
8919
|
+
id: 'Editor.goToDefinition',
|
|
8920
|
+
label: editorGoToDefinition()
|
|
8921
|
+
}, {
|
|
8922
|
+
id: 'Editor.goToTypeDefinition',
|
|
8923
|
+
label: editorGoToTypeDefinition()
|
|
8924
|
+
}, {
|
|
8925
|
+
id: 'Editor.selectInsideString',
|
|
8926
|
+
label: editorSelectInsideString()
|
|
8927
|
+
}, {
|
|
8928
|
+
id: 'Editor.indent',
|
|
8929
|
+
label: editorIndent(),
|
|
8930
|
+
aliases: ['Indent More', 'DeIndent']
|
|
8931
|
+
}, {
|
|
8932
|
+
id: 'Editor.unindent',
|
|
8933
|
+
label: editorUnindent$1(),
|
|
8934
|
+
aliases: ['Indent Less', 'DeIndent']
|
|
8935
|
+
}, {
|
|
8936
|
+
id: 'Editor.sortLinesAscending',
|
|
8937
|
+
label: editorSortLinesAscending()
|
|
8938
|
+
}, {
|
|
8939
|
+
id: 'Editor.toggleComment',
|
|
8940
|
+
label: editorToggleComment()
|
|
8941
|
+
}, {
|
|
8942
|
+
id: 'Editor.selectUp',
|
|
8943
|
+
label: editorSelectUp()
|
|
8944
|
+
}, {
|
|
8945
|
+
id: 'Editor.selectDown',
|
|
8946
|
+
label: editorSelectDown()
|
|
8947
|
+
}, {
|
|
8948
|
+
id: 'Editor.toggleBlockComment',
|
|
8949
|
+
label: toggleBlockComment$1()
|
|
8950
|
+
}, {
|
|
8951
|
+
id: 'Editor.openColorPicker',
|
|
8952
|
+
label: editorOpenColorPicker()
|
|
8953
|
+
}, {
|
|
8954
|
+
id: 'Editor.closeColorPicker',
|
|
8955
|
+
label: editorCloseColorPicker()
|
|
8956
|
+
}, {
|
|
8957
|
+
id: 'Editor.copyLineDown',
|
|
8958
|
+
label: editorCopyLineDown()
|
|
8959
|
+
}, {
|
|
8960
|
+
id: 'Editor.copyLineUp',
|
|
8961
|
+
label: editorCopyLineUp()
|
|
8962
|
+
}, {
|
|
8963
|
+
id: 'Editor.moveLineDown',
|
|
8964
|
+
label: moveLineDown$1()
|
|
8965
|
+
}, {
|
|
8966
|
+
id: 'Editor.moveLineUp',
|
|
8967
|
+
label: moveLineUp$1()
|
|
8968
|
+
}, {
|
|
8969
|
+
id: 'Editor.showSourceActions2',
|
|
8970
|
+
label: sourceAction()
|
|
8971
|
+
}];
|
|
8972
|
+
};
|
|
8973
|
+
|
|
8802
8974
|
const getSelections = editorUid => {
|
|
8803
8975
|
const editor = getEditor(editorUid);
|
|
8804
8976
|
const {
|
|
@@ -9746,7 +9918,7 @@ const keep = [
|
|
|
9746
9918
|
// 'ColorPicker.handleSliderPointerDown',
|
|
9747
9919
|
// 'ColorPicker.handleSliderPointerMove',
|
|
9748
9920
|
// 'ColorPicker.loadContent',
|
|
9749
|
-
'Editor.create', 'Editor.getWordAt', 'Editor.getWordBefore', 'Editor.offsetAt', 'Editor.render',
|
|
9921
|
+
'Editor.create', 'Editor.getWordAt', 'Editor.getWordBefore', 'Editor.offsetAt', 'Editor.render', 'Editor.getKeyBindings', 'Editor.getQuickPickMenuEntries',
|
|
9750
9922
|
// 'ColorPicker.render',
|
|
9751
9923
|
'Editor.getText', 'Editor.getSelections', 'Font.ensure', 'Hover.getHoverInfo', 'Hover.handleSashPointerDown', 'Hover.handleSashPointerMove', 'Hover.handleSashPointerUp', 'Hover.loadContent', 'Hover.render', 'Initialize.initialize'];
|
|
9752
9924
|
|
|
@@ -9878,6 +10050,7 @@ const commandMap = {
|
|
|
9878
10050
|
'Editor.findAllReferences': findAllReferences,
|
|
9879
10051
|
'Editor.format': format,
|
|
9880
10052
|
'Editor.getKeyBindings': getKeyBindings,
|
|
10053
|
+
'Editor.getQuickPickMenuEntries': getQuickPickMenuEntries,
|
|
9881
10054
|
'Editor.getSelections': getSelections,
|
|
9882
10055
|
'Editor.getText': getText,
|
|
9883
10056
|
'Editor.getWordAt': getWordAt,
|