VSCode 注释后光标快速定位下一行

VSCode默认用 Ctrl + / 注释一行时,光标停留在该行中。下面介绍如何注释后,光标会自动移动到下一行。

1.【View】 ->【Extensions】->【查找并安装Multi-command 扩展】

2.【File 】 -> 【Preferences 】->【Keyboard Shortcuts】(macOS :Code ,Preferences ,Keyboard Shortcuts)

3.【在搜索栏里面搜索 Open Keyboard Shortcuts (JSON)】->【去到别的文件下,打开Keybinding.json】

如果Keybinding是空的,则自己随便设置一个快捷键,去到别的文件下,按下快捷键打开keybindings.json

4.在keybindings.json文件下添加以下代码

json 复制代码
[
    {
        "key": "ctrl+/",
        "command": "extension.multiCommand.execute",
        "args": {
          "sequence": [
            "editor.action.commentLine",
            "cursorDown"
          ]
        },
        "when": "editorTextFocus"
      }
]
相关推荐
郝学胜-神的一滴4 小时前
Qt 高级开发 005: Qt Creator与Visual Studio 项目双向转换
开发语言·c++·ide·qt·程序人生·visual studio
irpywp6 小时前
Rilmazafone :一款可视化 DMG 编辑器,拖拽排版一键生成
开源·编辑器·github
不剪发的Tony老师7 小时前
Code::Blocks:一款免费开源的C/C++/Fortran集成开发环境
c语言·c++·ide
高斯林.神犇7 小时前
Idea中使用Git
java·ide·intellij-idea
lifewange11 小时前
如何在VScode中配置shell环境?
ide·vscode·编辑器
codingxb4511 小时前
VSCode中使用ClaudeCode接入Deepseek-v4模型
vscode·deepseek·claude code
lpfasd12311 小时前
Trae Solo 与 Qoder Quest
ide·人工智能·cli
阿凡达蘑菇灯12 小时前
gemini助手 插件 强制设置在本地运行
vscode
martian66512 小时前
在 IntelliJ IDEA 中安装、配置 Claude Code 及解决连接错误完全指南
java·ide·intellij-idea
Tisfy13 小时前
VSCode Docker(Code Server)首次调试C++长时间下载debuginfo问题
c++·vscode·docker