05实用技术/VSCode - 配置

软件设置

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
{
"workbench.colorTheme": "Solarized Dark",
"editor.fontSize": 15,

// terminal
// WSL 用 Remote Development 更好
// "terminal.integrated.shell.windows": "C:\\WINDOWS\\Sysnative\\bash.exe",
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",

// git
"git.rebaseWhenSync": true,

// debug
"debug.allowBreakpointsEverywhere": true,

// emmet
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"emmet.syntaxProfiles": {
"javascript": "javascriptreact"
},
"emmet.triggerExpansionOnTab": true,

// eslint
"eslint.validate": ["javascript", "javascriptreact", "html", "vue"],

// format
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}

快捷键

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
// Place your key bindings in this file to override the defaultsauto[]
[
// suggest
{
"key": "alt+j",
"command": "editor.action.triggerSuggest",
"when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly"
},
{
"key": "alt+j",
"command": "toggleSuggestionDetails",
"when": "suggestWidgetVisible && textInputFocus"
},
// view & go
{
"key": "alt+up",
"command": "workbench.action.navigateBack"
},
{
"key": "alt+down",
"command": "workbench.action.navigateForward"
},
{
"key": "alt+right",
"command": "workbench.action.nextEditor"
},
{
"key": "alt+right",
"command": "-workbench.action.navigateForward"
},
{
"key": "alt+left",
"command": "workbench.action.previousEditor"
},
{
"key": "alt+left",
"command": "-workbench.action.navigateBack"
},
// file & edit
{
"key": "alt+s",
"command": "workbench.action.files.save"
},
{
"key": "alt+q",
"command": "workbench.action.closeActiveEditor"
},
{
"key": "alt+c",
"command": "editor.action.clipboardCopyAction",
"when": "textInputFocus"
},
{
"key": "alt+v",
"command": "editor.action.clipboardPasteAction",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "alt+z",
"command": "undo",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "shift+alt+z",
"command": "redo",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "alt+a",
"command": "editor.action.selectAll",
"when": "textInputFocus"
},
{
"key": "alt+f",
"command": "actions.find"
},
{
"key": "alt+h",
"command": "editor.action.startFindReplaceAction"
},
{
"key": "alt+n",
"command": "workbench.action.files.newUntitledFile"
},
]