【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"
    }
}
相关推荐
时空自由民.6 小时前
vim入门配置教程
编辑器·vim·excel
zh_xuan7 小时前
解决VS Code 控制台中文乱码
c++·vscode·乱码
周末也要写八哥8 小时前
Eclipse 2024全流程网盘下载与安装配置教程详解
java·ide·eclipse
猿儿本无心9 小时前
快速搭建Python项目(Vscode+uv+FastAPI)
vscode·python·uv
ChampaignWolf11 小时前
在 Eclipse 中使用 Tabnine
java·ide·eclipse
π同学13 小时前
ESP-IDF+vscode开发ESP32第十二讲——event
vscode·esp32·事件循环库event
诗水人间13 小时前
VsCode 中使用Copilot调用Deepseek V4模型
ide·vscode·copilot
梦想家加一14 小时前
vscode为什么下载了汉化插件却不生效
ide·vscode·编辑器
神码编程15 小时前
【Unity】MiniGame编辑器小游戏(十五)中国象棋局域网对战【Chinese Chess】(上)
unity·编辑器·游戏引擎·小游戏
NiceCloud喜云15 小时前
Claude API 流式输出(SSE)实战:从打字机效果到工具调用全流程
java·前端·ide·人工智能·chrome·intellij-idea·状态模式