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"
      }
]
相关推荐
wtsolutions2 小时前
图片GPS数据编辑器完全指南:如何修改、添加和批量处理图片位置信息
编辑器·gps·图片·照片
JavaLearnerZGQ14 小时前
在Windows上使用Ollama工具本地部署deepseek-r1:7b
ide
宁静致远202114 小时前
STM32CubeMX、MDK(Keil MDK)、git、vscode等工具中统一编码设置(UTF-8),确保中文支持,避免乱码问题
git·vscode·stm32
高斯林.神犇18 小时前
idea快捷键
java·ide·intellij-idea
AC赳赳老秦21 小时前
多模态 AI 驱动办公智能化变革:DeepSeek 赋能图文转写与视频摘要的高效实践
java·ide·人工智能·python·prometheus·ai-native·deepseek
宫瑾21 小时前
VSCode使用C/C++ extensions开发STM32,添加头文件路径
c语言·c++·vscode
番茄去哪了2 天前
苍穹外卖day07---Redis缓存优化与购物车功能实现
java·数据库·ide·spring boot·spring·maven·mybatis
ol木子李lo2 天前
Linux 命令备忘录
linux·运维·服务器·windows·编辑器·ssh·bash
三无少女指南2 天前
开发者环境配置最佳实践:编辑器Cursor ,VS Code的上位体验实现 AI 与 WSL 联动
运维·c语言·数据库·windows·git·编辑器
水木姚姚2 天前
string类(C++)
开发语言·c++·windows·vscode·开发工具