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"
      }
]
相关推荐
csdn2015_2 小时前
vscode从gitlab拉项目到本地
vscode·gitlab
△曉風殘月〆3 小时前
如何在Visual Studio 2026中配置Qt 6.1开发环境
ide·visual studio
zhangjin11207 小时前
解决Android Studio gradle下载超时和缓慢问题(二)
android·ide·android studio
longerxin202016 小时前
nano编辑器插入、编辑完整操作教程(Linux日志/配置专用)
linux·运维·编辑器
寒水馨1 天前
Windows下载、安装neovim-v0.12.4(附安装包nvim-win64.msi)
windows·编辑器·vim·lua·终端·lsp·neovim
gongzhxu1 天前
JetBrains IDEA开发环境搭建
java·ide·intellij-idea
独隅1 天前
DevEco Code Plan+Build 双 Agent 协同开发实效解析
ide·华为
Yolanda_20222 天前
在vscode终端中可使用pip,但是cmd终端中找不到命令 pip问题的解决
vscode·python·conda·pip
ITmaster07312 天前
告别 IDE?Android CLI 来了,开发进入 AI Agent 时代
android·ide·人工智能
π同学2 天前
ESP-IDF+vscode开发ESP32 联网篇第一讲——WIFI扫描
vscode·esp32c6·wifi scan