windows vscode使用

vscode删除干净

  1. 使用 工具卸载干净
  2. 删除 C:\Users\darling.vscode 文件夹 ps:darling 是你自己的个人用户,也就是你打开电脑,进入c盘->用户就可以看到
  3. 删除 C:\Users\darling\AppData\Roaming\Code文件夹
    删除这三个基本上就是删除干净了

配置问题

  1. 自动识别编码,需要开启一下识别编码配置,参考: https://zhuanlan.zhihu.com/p/553457718?utm_id=0
  2. 连接到远程很慢,主要是你本地安装中文插件,远程没有安装,具体参考 :
  3. 远程插件安装慢:从 https://marketplace.visualstudio.com/publishers/Microsoft 这个里面下载插件,然后通过VSI安装
  4. vscode卡顿优化设置,
  5. 搜索忽略指定的文件夹 ,参考: https://zhuanlan.zhihu.com/p/654171310

mac vscode的使用

做c/c++开发的,其实还是更习惯使用source insight的,尤其是si的全局模糊匹配的功能,这个切到vscode后最难适应的,但但无奈si没有mac版本,那就切到vscode,并慢慢去熟练使用吧~
谨以此文记录一下vscode从入门到放弃😊

clangd插件关闭自动类型推导
点击左下的齿轮图标->设置,搜索inlayHints ,有4个下拉选项

  • on: 始终显示内联提示
  • onUnlessPressed: 默认显示内联提示,并在按Ctrl+Alt时隐藏
  • offUnlessPressed: 默认隐藏内联提示,并在按Ctrl+Alt时显示
  • off: 始终隐藏内联提示
  1. 插件
  • 高亮插件
    名称: highlight
    是一个红色的插件里面有描述写,高亮,我个人很喜欢这个插件,从si过来的,一定不要下错了,装完后,高亮插件快捷键是shift fn f8 ,可以自己改,自己改的在快捷键里面,直接搜这个快捷键就会出来
  • vs code运行ios vs code for mac怎么用_vs code运行ios

  • 修改高亮快捷键:
  • vs code运行ios vs code for mac怎么用_vs code运行ios_02


  • vs code运行ios vs code for mac怎么用_vscode_03

  • 注释插件
    名称: Doxygen Documentation Generator
    直接上注释插件配置文件吧
{
    "doxdocgen.file.copyrightTag": [
        "\nCopyright (C),  ZheJiang Dahua Technology Stock CO.LTD.\n",
    ],
    "doxdocgen.file.fileTemplate": "Filename     Main.cpp",
    "doxdocgen.file.versionTag": "version 1.0.0",
    "doxdocgen.generic.paramTemplate": "@param \t {param}:",
    "doxdocgen.generic.dateFormat": "YYYY/MM/DD",
    "doxdocgen.generic.authorEmail": "ni_dailiang@dahuatech.com",
    "doxdocgen.generic.authorName": "ni_dailiang",
    "doxdocgen.generic.authorTag": "@author \t {author}",
    "doxdocgen.generic.dateTemplate": "@date \t {date}",
    "doxdocgen.generic.briefTemplate": "@brief \t 注释",
    "doxdocgen.generic.returnTemplate": "@return \t 返回值",
    "doxdocgen.file.customTag": [
        // 文件级的自定义注释
         "Author       {author}",
         "Version      1.0.0",
         "Date         {date}",
         "Description  The function interface",
         "Revisions    {date} : create file"
    ],
    "doxdocgen.generic.customTags": [
         "@note\t 特殊说明",
    ],
    // 文件注释
    "doxdocgen.file.fileOrder": [
        "copyright",
        "file",
        "custom",
    ],
    // 函数注释
    "doxdocgen.generic.order": [
        "author",
        "date",
        "brief",
        "param",
        "return",
        "custom"
    ],
    "doxdocgen.generic.useGitUserEmail": true,
    "doxdocgen.generic.useGitUserName": true,
}

使用的话在文件开始或者函数上输入 /** 再回车,会自动补全相关注释,个人觉得还是好用

  • 查看内存插件
    名称: MemoryView
    可以查看运行的代码内存,不做演示了

  1. 快捷键:
    快速打开关闭左侧弹窗:command b
    快速打开关闭终端:control ~(1左边的那个按键)
    快速打开关闭下侧窗口: command j
    全文搜索: command p
    当前文件全文搜索函数: command shift o 或者 command p后输入@
    快速跳转到行:control g
    撤销/反撤销 :control z / control shift z
    快速多行注释和取消注释:command /
    注释一整段代码:option + shift + a
    进入所选字段 : command 鼠标左键
    返回上一层/进入下一层:control - / control shift -
    高亮: shift fn f8
    文件头尾: command ↑ / command ↓
  2. 其他:
    vscode无法更新问题
    在终端输入以下命令
sudo chown -R $USER ~/Library/Caches/com.microsoft.VSCode.ShipIt

输入后,回车会提示输入密码。

xattr -dr com.apple.quarantine /Applications/Visual\ Studio\ Code.app

“/Applications/Visual\ Studio\ Code.app” 部分为vscode的目录。输入完后,回车。
这样就可以解决出现的问题。