在VS代码中创建多个光标的键盘快捷键是什么?
当前回答
https://code.visualstudio.com/Updates
新版本(Visual Studio 0.3.0)支持更多的多光标功能。
Multi-cursor
Here's multi-cursor improvements that we've made.
⌘D selects the word at the cursor, or the next occurrence of the current selection.
⌘K ⌘D moves the last added cursor to next occurrence of the current selection.
The two actions pick up the matchCase and matchWholeWord settings of the find widget.
⌘U undoes the last cursor action, so if you added one cursor too many or made a mistake, press ⌘U to return to the previous cursor state.
Insert cursor above (⌥⌘↑) and insert cursor below (⌥⌘↓) now reveals the last added cursor, making it easier to work with multi-cursors spanning more than one screen height (i.e., working with 300 lines while only 80 fit in the screen).
选择多光标的快捷方式更改为cmd+d(与Sublime Text.lol相同)
我们可以预期,下一个版本支持关于多光标的更方便的功能;)
其他回答
Alt+单击。它在Windows中工作。
详细信息:Visual Studio代码文档
尝试Ctrl+Alt+Shift+⬇ / ⬆, 不使用鼠标,或按住“alt”并单击所需的所有行。
注意:已在Windows上测试。
https://code.visualstudio.com/Updates
新版本(Visual Studio 0.3.0)支持更多的多光标功能。
Multi-cursor
Here's multi-cursor improvements that we've made.
⌘D selects the word at the cursor, or the next occurrence of the current selection.
⌘K ⌘D moves the last added cursor to next occurrence of the current selection.
The two actions pick up the matchCase and matchWholeWord settings of the find widget.
⌘U undoes the last cursor action, so if you added one cursor too many or made a mistake, press ⌘U to return to the previous cursor state.
Insert cursor above (⌥⌘↑) and insert cursor below (⌥⌘↓) now reveals the last added cursor, making it easier to work with multi-cursors spanning more than one screen height (i.e., working with 300 lines while only 80 fit in the screen).
选择多光标的快捷方式更改为cmd+d(与Sublime Text.lol相同)
我们可以预期,下一个版本支持关于多光标的更方便的功能;)
在我的XFCE(4.12版)中,它位于“设置”->“窗口管理器调整”->“辅助功能”中。
有一个下拉字段Key用于抓取和移动窗口:,将其设置为None。
Alt+Click现在可以在VS代码中添加更多光标。
VS代码中的多字(和多行)光标/选择
多单词:
Windows/OS X:
按住Ctrl+Shift+L/¨+Shift+L选择当前高亮显示单词的所有实例Ctrl+D/¨+D选择下一个实例。。。之后的那个。。。等
多行:
对于多行选择,Ctrl+Alt+Down/¨+Alt+Shift+Down将将您的选择或光标位置扩展到下一行。Ctrl+Right/⑪+Right将移动到每行的末尾,无论多长时间。要退出多行选择,请按Esc。
请参阅VS代码密钥绑定(与操作系统相关)
推荐文章
- 如何设置每个文件类型的标签大小?
- 我如何添加环境变量启动。VSCode中的json
- 如何格式化Visual Studio Code项目中的所有文件?
- Pylint在Visual Studio代码中“未解决的导入”错误
- 如何在VS Code中默认打开文本换行
- 在Visual Studio代码中更改突出显示文本的颜色
- Visual studio代码-键盘快捷键-全部展开/折叠
- Visual Studio Code无法检测已安装的Git
- 禁用Visual Studio代码中的工具提示提示
- Visual Studio Code -将空格转换为制表符
- 在VSCode中的列自动硬换行
- Visual Studio Code:格式没有使用缩进设置
- 如何排除文件扩展名和语言从“格式保存”在VSCode?
- Visual Studio代码- URI的目标不存在" package:flutter/material.dart "
- VSCode——如何设置调试Python程序的工作目录