vscode配置

扩展

在这里插入图片描述

快捷键

// 将键绑定放在此文件中以覆盖默认值auto[]
[
  {
    "key": "ctrl+shift+backspace oem_plus",
    "command": "editor.action.addSelectionToNextFindMatch",
    "when": "editorFocus"
  },
  {
    "key": "ctrl+d",
    "command": "-editor.action.addSelectionToNextFindMatch",
    "when": "editorFocus"
  },
  {
    "key": "ctrl+d",
    "command": "editor.action.deleteLines",
    "when": "textInputFocus && !editorReadonly"
  },
  {
    "key": "ctrl+shift+k",
    "command": "-editor.action.deleteLines",
    "when": "textInputFocus && !editorReadonly"
  },
  {
    "key": "ctrl+shift+oem_2",
    "command": "editor.action.blockComment",
    "when": "editorTextFocus && !editorReadonly"
  },
  {
    "key": "shift+alt+a",
    "command": "-editor.action.blockComment",
    "when": "editorTextFocus && !editorReadonly"
  },
  {
    "key": "ctrl+q",
    "command": "-workbench.action.quickOpenNavigateNextInViewPicker",
    "when": "inQuickOpen && inViewsPicker"
  },
  {
    "key": "ctrl+q",
    "command": "-workbench.action.quickOpenView"
  },
  {
    "key": "ctrl+shift+q",
    "command": "editor.action.triggerSuggest",
    "when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly && !suggestWidgetVisible"
  },
  {
    "key": "ctrl+i",
    "command": "-editor.action.triggerSuggest",
    "when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly && !suggestWidgetVisible"
  },
  {
    "key": "ctrl+shift+q",
    "command": "-workbench.action.quickOpenNavigatePreviousInViewPicker",
    "when": "inQuickOpen && inViewsPicker"
  },
  {
    "key": "ctrl+space",
    "command": "-editor.action.triggerSuggest",
    "when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly && !suggestWidgetVisible"
  },
  {
    "key": "ctrl+shift+w",
    "command": "editor.action.inlineSuggest.trigger"
  },
  {
    "key": "ctrl+q",
    "command": "editor.action.triggerParameterHints",
    "when": "editorHasSignatureHelpProvider && editorTextFocus"
  },
  {
    "key": "ctrl+shift+space",
    "command": "-editor.action.triggerParameterHints",
    "when": "editorHasSignatureHelpProvider && editorTextFocus"
  }
]

设置

{
  "liveServer.settings.donotShowInfoMsg": true,
  "emmet.includeLanguages": {},
  "editor.formatOnType": true,
  "typescript.tsdk": "",
  "explorer.confirmDelete": false,
  "workbench.iconTheme": "vscode-icons",
  "terminal.integrated.tabs.enabled": true,
  "emmet.excludeLanguages": ["markdown"],
  "editor.suggest.snippetsPreventQuickSuggestions": false,
  "search.followSymlinks": false,
  "git.autorefresh": false,
  "editor.fontLigatures": null,
  "editor.mouseWheelZoom": true,
  "emmet.syntaxProfiles": {},
  "editor.formatOnType": true,
  "editor.formatOnSave": true,
  "vetur.validation.template": false,
  "editor.tabSize": 2,
  "editor.detectIndentation": false,
  "workbench.colorCustomizations": {},
  "emmet.triggerExpansionOnTab": true,
  "security.workspace.trust.untrustedFiles": "open",
  "editor.fontFamily": "consolas",
  "editor.fontSize": 20,
  "editor.lineHeight": 1.8,
  "editor.minimap.enabled": false,
  "remote.SSH.remotePlatform": {
    "alias": "linux"
  },
  "code-runner.runInTerminal": true,
  "code-runner.executorMap": {
    "c": "cd $dir && gcc -fexec-charset=GBK $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
    "cpp": "cd $dir && g++ -fexec-charset=GBK $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt"
  },
  "editor.cursorWidth": 2,
  "editor.renderWhitespace": "none",
  "editor.unicodeHighlight.ambiguousCharacters": false,
  "editor.cursorSurroundingLines": 1,
  "cssrem.rootFontSize": 37.5,
  "cssrem.vw": true,
  "terminal.integrated.cursorWidth": 2,
  "cssrem.vwDesign": 375,
  "editor.bracketPairColorization.enabled": true,
  "editor.guides.bracketPairs": "active",
  "javascript.validate.enable": false,
  "editor.cursorBlinking": "expand",
  "editor.stickyScroll.enabled": false,
  "liveServer.settings.AdvanceCustomBrowserCmdLine": "",
  "liveServer.settings.CustomBrowser": "chrome",
  "hediet.vscode-drawio.theme": "atlas",
  "hediet.vscode-drawio.resizeImages": null,
  "terminal.integrated.defaultProfile.windows": "PowerShell",
  "vsicons.dontShowNewVersionMessage": true,
  "terminal.integrated.fontSize": 18,
  "vue.format.script.initialIndent": true,
  "vue.format.style.initialIndent": true,
  "vue.server.hybridMode": true,
  "editor.tokenColorCustomizations": {
    "comments": {
      // 设置字体样式 加粗 下划线 斜体等
      "fontStyle": "", //  italic underline
      // 设置字体颜色
      // "foreground": "#4caee2"
      // "foreground": "#61a957",
      "foreground": "#90928f"
    }
  },
  "workbench.colorTheme": "escook Light",
  "vue.autoInsert.dotValue": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "git.autofetch": true,
  "prettier.semi": false,
  "gitlens.graph.minimap.dataType": "lines"
}

Visual Studio Code(VSCode)是一个轻量级但功能强大的源代码编辑器,由微软开发。它支持多种编程语言的开发,包括C++。要配置VSCode以进行C++开发,你需要按照以下步骤操作: 1. 安装VSCode:首先确保你的系统上已经安装了VSCode。 2. 安装C++扩展:在VSCode打开扩展视图(使用快捷键`Ctrl+Shift+X`或`Cmd+Shift+X`),搜索并安装C/C++扩展,由Microsoft提供。这个扩展提供了对C++语言的智能感知、调试支持等功能。 3. 配置编译器:你需要为VSCode配置C++编译器。在Windows上,你可以使用MinGW或Visual Studio的编译器;在Linux上,可以使用GCC;在macOS上,可以使用Clang。通常情况下,如果你已经安装了Visual Studio或相应的命令行工具,VSCode将能够自动检测到这些工具。 4. 创建或打开项目:你可以创建一个新的C++项目,或者打开一个已有的项目。VSCode将使用工作区(workspace)的概念来管理项目文件。 5. 编辑c_cpp_properties.json:在VSCode,打开一个C++文件,然后在右下角的状态栏,点击“C/C++”环境,选择“Edit in settings.json”来配置编译器路径、包含路径、库路径等。 6. 设置构建任务:为了编译项目,你需要定义构建任务。可以通过`Ctrl+Shift+P`打开命令面板,输入“Tasks: Configure Task”来自动生成一个基本的构建任务。然后根据你的项目配置,修改这个任务定义文件。 7. 使用终端进行构建和运行:VSCode集成了一个终端,你可以直接在VSCode内运行构建命令和程序。 8. 调试程序:配置好`launch.json`文件后,你就可以在VSCode设置断点,启动调试会话。 通过上述步骤,你就可以在VSCode配置并开始C++编程了。当然,根据不同的需求,可能还需要进行更多的个性化配置
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

iku_ki

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值