2025年2月24日 星期一 甲辰(龙)年 腊月廿四 设为首页 加入收藏
rss
您当前的位置:首页 > 计算机 > 软件应用 > 开发工具(IDE)

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

时间:02-21来源:作者:点击数:33

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文件下添加以下代码

  • [
  • {
  • "key": "ctrl+/",
  • "command": "extension.multiCommand.execute",
  • "args": {
  • "sequence": [
  • "editor.action.commentLine",
  • "cursorDown"
  • ]
  • },
  • "when": "editorTextFocus"
  • }
  • ]

5.其他常用按键配置

  • {
  • "key": "ctrl+d",
  • "command": "editor.action.deleteLines",
  • "when": "editorTextFocus"
  • },
  • {
  • "key": "ctrl+alt+down",
  • "command": "editor.action.copyLinesDownAction",
  • "when": "editorTextFocus"
  • }

eclipse常用按键详情

方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门