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