【VSCode】VSCode 使用

目录

文章目录

  • 目录
  • 插件
  • 配置
    • [设置代码不显示 git 提示 "xxx months ago | 1 author"](#设置代码不显示 git 提示 "xxx months ago | 1 author")
    • [设置打开项目不自动选择 CMakeLists](#设置打开项目不自动选择 CMakeLists)

插件

以下插件为 C++ 开发偏好设置。

  • C/C++
  • CMake
  • CMake Tools
  • GitLens
  • Remote Development
  • Remote Explorer

配置

设置代码不显示 git 提示 "xxx months ago | 1 author"

安装 GitLens 之后,代码文件中显示 "xxx months ago, | 1 author" 这样的信息,就像这样:

个人感觉影响阅读,关闭方法:

左侧 GitLens 插件 ------ GitLens Settings ------ Git CodeLens ------ 取消勾选即可。

设置打开项目不自动选择 CMakeLists

在打开工程时会让选择一个 CMakeLists 文件,如果不选定,每次打开都会提示,如果选定,每次打开都会自动加载这个选定的 CMakeLists 文件。个人感觉不好用,不如让我自己选择加载哪个 CMakeLists ,关闭的方法:

左侧 CMake ------ 点击窗口上的设置图标(Open CMake Tools Extension Settings)------ Cmake: Configure On Open ------ 取消勾选即可。

另外,在项目根目录下的 .vscode/settings.json 中可以配置 CMake 的根目录:

settings.json:

json 复制代码
{
    "cmake.sourceDirectory": "/Users/boss/Desktop/codes/cpp",
    "files.associations": {
        "optional": "cpp"
    }
}
相关推荐
Nonoas4 小时前
动态代理:发布订阅的高级玩法
java·ide·intellij-idea
WHJ22611 小时前
记录解决jupyter打开闪退
ide·python·jupyter
mrsyf12 小时前
Android Studio Otter 2(2025.2.2版本)安装和Gradle配置
android·ide·android studio
石马农汪13 小时前
cursor如何打开多个文件夹不替换之前的文件夹
编辑器·cursor
NiceAsiv13 小时前
VSCode之打开python终端 取消conda activate的powershell弹窗
vscode·python·conda
胖好白14 小时前
【RK3588开发】RK3588的Debian系统环境搭建
linux·vscode·debian
A等天晴15 小时前
速通gemini3pro+开发工具Antigravity
ide·人工智能
无限进步_16 小时前
C++ Vector 全解析:从使用到深入理解
开发语言·c++·ide·windows·git·github·visual studio
A132470531217 小时前
curl命令入门:命令行测试接口
linux·运维·服务器·网络·编辑器·github·vim
Hiweir ·17 小时前
ROS Noetic教程------VSCode创建ROS话题通讯--发布方的简单流程
vscode·python·ros noetic·ros noetic教程