0%

vscode-setting-bk

本文主要是对个人vs-code设置以及配置的备份,用于及其意外情况下的恢复(希望不会用到)

setting.jsonkeybinding.jsongitee上也做了备份,地址:https://gitee.com/dingdingqiu/share

CPP调试环境

  1. 下载mingw64,解压到D盘

    访问下面这个链接得到资源:

    1
    https://gitcode.com/open-source-toolkit/ee6ea/overview
  2. 配置环境变量

  3. vscode下载c/cpp插件

  4. ctrl-shift-p,选中第一个C/C++:Edit Configurations(UI)

    5.配置信息如下:

    其实不用改啥东西了,几乎所有选项在配置好环境变量后vscode都能自动识别,这里主要做对照用。关键是要下载mingw64,不要下载任何其他乱七八糟的。

VSCode_编辑配置

1.Setting.json

设置里直接搜索setting.json即可

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
{
"security.allowedUNCHosts": [
"wsl.localhost"
],

"git.openRepositoryInParentFolders": "never",
"cmake.showOptionsMovedNotification": false,
"code-runner.runInTerminal": true,
"security.workspace.trust.untrustedFiles": "open",

"workbench.colorTheme": "Tokyo Night Storm",
"vim.easymotion": true,
"vim.incsearch": true,
"vim.useSystemClipboard": true,
"vim.useCtrlKeys": true,
"vim.hlsearch": true,
"vim.leader": "<space>",
"vim.insertModeKeyBindings": [
{
"before": ["j", "k"],
"after": ["<Esc>"]
},
{
"before": ["<C-j>"],
"commands": ["workbench.action.terminal.focus"]
},
],
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["<leader>","c"],
"commands": ["workbench.action.closeActiveEditor"]
},
{
"before": ["<leader>", "n", "h"],
"commands": [":nohl"]
},
{
"before": ["L"],
"commands": [":tabnex"]
},
{
"before": ["H"],
"commands": [":tabprev"]
},
{
"before": ["<leader>", "f", "o"],
"commands": ["workbench.action.openRecent"]
},
{
"before": ["<C-j>"],
"commands": ["workbench.action.terminal.focus"]
},
],

"vim.handleKeys": {
"<C-a>": false,
"<C-f>": false
},
}

2.keybinding.json

ctrl-shift-p,打开箭头指的这个Preferences:Open Keyboard Shortcuts(JSON)即可。

配置为:

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
// Place your key bindings in this file to override the defaults
[
{
"key": "shift+alt+down",
"command": "-editor.action.insertCursorBelow",
"when": "editorTextFocus"
},
{
"key": "shift+alt+down",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+alt+down",
"command": "-editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+h",
"command": "workbench.action.navigateLeft"
},
{
"key": "ctrl+l",
"command": "workbench.action.navigateRight"
},
{
"key": "ctrl+k",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
},
]