vscode 编辑环境setting.json配置
时间: 2023-12-18 11:05:29 浏览: 88
在VS Code中,setting.json文件用于配置编辑器的各种设置。以下是一些常见的配置:
1. 配置字体:
```
"editor.fontFamily": "Consolas",
"editor.fontSize": 14
```
2. 配置主题:
```
"workbench.colorTheme": "Default Dark+"
```
3. 配置自动保存:
```
"files.autoSave": "onFocusChange",
"files.autoSaveDelay": 1000
```
4. 配置代码折叠:
```
"editor.folding": true
```
5. 配置代码提示:
```
"editor.tabCompletion": "on",
"editor.wordBasedSuggestions": true
```
6. 配置代码格式化:
```
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.formatOnPaste": true
```
以上是一些常见的配置,你可以根据自己的需要进行调整。在设置之前,你需要确保已经安装了相关的插件。
相关问题
vscode嵌入式配置环境setting.json配置
要在 VS Code 中配置嵌入式开发环境,需要在setting.json文件中进行配置。可以按照以下步骤进行操作:
1. 打开 VS Code,进入“设置”(快捷键Ctrl + ,)界面。
2. 在搜索框中输入“setting.json”,点击“编辑设置.json”。
3. 在打开的setting.json文件中,添加以下配置:
```
"files.associations": {
"*.c": "c",
"*.h": "c",
"*.cpp": "cpp",
"*.hpp": "cpp"
},
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"C_Cpp.default.compilerPath": "C:\\Program Files (x86)\\GNU Arm Embedded Toolchain\\9 2020-q2-update\\bin\\arm-none-eabi-gcc.exe",
"C_Cpp.default.includePath": [
"${workspaceFolder}/**",
"C:/Program Files (x86)/GNU Arm Embedded Toolchain/9 2020-q2-update/arm-none-eabi/include/"
],
"C_Cpp.default.defines": [
"__GNUC__",
"__ARMCC_VERSION=6010050",
"__cplusplus"
],
"C_Cpp.default.cStandard": "c11",
"C_Cpp.default.cppStandard": "c++17"
```
其中,“files.associations”用于关联文件类型的语言,根据实际情况进行配置;“terminal.integrated.shell.windows”用于指定终端的命令行解释器,这里以Windows系统为例;“C_Cpp.default.compilerPath”用于指定编译器的路径,根据实际情况进行配置;“C_Cpp.default.includePath”用于指定头文件的搜索路径,根据实际情况进行配置;“C_Cpp.default.defines”用于指定编译时的宏定义,根据实际情况进行配置;“C_Cpp.default.cStandard”和“C_Cpp.default.cppStandard”用于指定C和C++的标准版本,根据实际情况进行配置。
4. 保存setting.json文件,重启 VS Code。
以上就是在 VS Code 中配置嵌入式开发环境的步骤和注意事项。
vscode中setting.json配置
VSCode 中的 setting.json 文件用于存储用户自定义的配置设置。可以通过按下 "Ctrl + , " 或点击文件菜单中的 "设置" 来打开 setting.json 文件。在 setting.json 中可以配置诸如字体大小、语言设置、快捷键绑定等信息。例如,可以将 "editor.fontSize" 设置为 "14" 来调整编辑器中字体的大小。
阅读全文
相关推荐
















