vscode c c++ python linux 嵌入式开发环境配置

VsCode C++ Python 配置

扩展

  • Arm Assembly - 汇编语法高亮。
  • autoDocstring - 自动生成 python 注释。
  • Better Comments - 创建可读性更高的注释以及用不同颜色高亮注释。
  • Black Formatter - 使用 black 格式化 python 代码。
  • C/C++ - C/C++ 语法支持,智能提示以及高亮。
  • Chinese Language - 简体中文语言包。
  • Cmake - Cmake支持。
  • Community Material Theme - Material 主题社区版。
  • DeviceTree - 设备树语法支持以及高亮。
  • Doxygen Documentation Generator - 快捷生成 doxygen 风格注释。
  • Git Graph - 查看 git graph。
  • Git History - 查看 git log, file history。
  • GitLens - 多方面提升 git 使用体验。
  • Hex Editor - 以16进制形式编辑文件。
  • indent-rainbow - 更好的显示缩进。
  • Kconfig - kconfig 和 kbuild 语法高亮。
  • MarkDown All in one - markdown 语法支持以及高亮。
  • markdownlint - markdown 语法检查。
  • Material Icon Theme - 超好看的文件图标。
  • Python - python 扩展。
  • Python Indent - 修正 python 缩进
  • Python Type Hint - python 类型提示
  • Remote - SSH - SSH 服务。
  • Remote Explorer - 查看 SSH 远端设备。
  • Remote x11 - 启用 X11 转发与远程 SSH 扩展,可通过 SSH 显示远端界面。
  • Trailing Spaces - 显示多余的空格以及一键去除多余空格。
  • Vim - vim 扩展。

配置

  • C/C++ 扩展配置,ctrl + shift + p,输入C/C++, 选择编辑配置(UI),可根据不同的项目更改以下几项:
    • 编译器路径
    • 编译器参数
    • 包含路径
    • 定义
    • C++ 标准
  • C/C++ 代码风格配置(适配华为C++语言编程规范)定位到 文件->首选项->设置,输入 format,找到 扩展->C/C++->格式设置,设置以下格式(没提到的保留原样):
    • C_Cpp > Formatting -> vcFormat
    • C_Cpp > Vc Format > indent: multiLineRelativeTo -> statementBegin
    • C_Cpp > Vc Format > indent: Within Parentheses -> aligenToParenthesis
    • C_Cpp > Vc Format > New Line: Before Catch -> 取消选中
    • C_Cpp > Vc Format > New Line: Before Else -> 取消选中
    • C_Cpp > Vc Format > New Line:Before Open Brace: block -> sameLine
    • C_Cpp > Vc Format > New Line:Before Open Brace: Function -> newLine
    • C_Cpp > Vc Format > New Line:Before Open Brace: Namespace -> sameLine
    • C_Cpp > Vc Format > New Line:Before Open Brace: Type -> sameLine
    • C_Cpp > Vc Format > New Line:Before Open Brace: Lambda -> sameLine
    • C_Cpp > Vc Format > Space: Pointer Reference Alignment -> left
  • 终端显示行数配置:文件->首选项->设置,输入scrollback,修改 Terminal > Integrated:Scrollback

导入配置

  • vscode_settings.code-profile,该设置包含了上述所有需要安装的插件以及配置
  • 导入方法:文件->首选项->配置文件->导入配置文件

快捷键

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

专注的罗哈哈

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

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

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

打赏作者

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

抵扣说明:

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

余额充值