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"
      }
]
相关推荐
xskukuku6 小时前
使用VSCode配置C语言运行环境
c语言·ide·vscode
小王C语言12 小时前
vscode智能提示问题、跳转问题
ide·vscode·编辑器
南知意-16 小时前
IDEA 2026.1最新版安装教程
java·ide·intellij-idea·idea安装·idea激活
隔窗听雨眠17 小时前
Typora插件开发指南:从零打造IDE级写作环境
ide·typora
专注_每天进步一点点19 小时前
IDEA中,Apifox Helper 的 2.0.15-243版本的插件 导出指定的接口,入参的中文名为空,描述为空
java·ide·intellij-idea
郝亚军19 小时前
如何在vscode上运行python程序
ide·vscode·编辑器
Arvin.Angela19 小时前
VsCode 安装文档
ide·vscode·编辑器
郝亚军19 小时前
Visual Studio 2022安装for C++桌面开发
c++·ide·visual studio
CAir220 小时前
copilot配置deepseek和skills
vscode·copilot·skill·deepseek