在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键的问题,修复方法是将ALT+click更改为Gnome热键,该热键在VSCode中阻止多光标选择,通过运行以下命令将其更改为super+click:
gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier "<Super>"
资料来源:http://2buntu.com/articles/1529/visual-studio-code-comes-to-linux/
在XFCE上,转到应用程序->设置->设置编辑器->xfwm4->easy_click(禁用值)
现在您可以使用Alt+Click插入光标
我还在“设置”->“窗口管理器”->“键盘”中禁用了L/R工作区(ctrl+alt+L/R)设置
你想要的东西没有约束。
唯一接近的是Ctrl+F2,它将一次选择所有选项。
您可以通过以下操作将其绑定到Ctrl+D:
单击“文件”>“首选项”>“键盘快捷键”您应该会看到一个窗格,其中包含当前绑定,并且右侧有一个自定义绑定列表在当前绑定中,搜索Ctrl+F2并复制整行并将其粘贴到右侧窗格中。您可能需要删除末尾的逗号,然后将Ctrl+F2更改为Ctrl+D,然后保存文件。
它应该看起来像这样:
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "ctrl+d", "command": "editor.action.changeAll",
"when": "editorTextFocus" }
]
Ctrl+Alt+⬇ / ⬆ 在当前行的上方和下方添加光标。然而,仍然远不及崇高或括号那么好。在键盘快捷键文件中,我看不到类似于升华中的Ctrl+D。
在窗口上:如果正在使用vscode,请按住CTRL键并单击如果正在使用visual studio,请按CTRL+Alt+
推荐文章
- 打开同一目录两次
- 如何从终端/命令行调用VS代码编辑器
- 如何在Visual Studio代码中重置设置?
- 如何将制表符转换为空格,反之亦然,在现有的文件
- 错误:'types'只能在.ts文件中使用- Visual Studio Code使用@ts-check
- Visual Studio Code: .git文件夹/文件隐藏
- Visual Studio Code:如何调试Python脚本的参数
- 如何在Visual Studio代码中触发参数提示?
- 在VS Code中禁用“Comments are not allowed In JSON”错误
- 使用正则表达式搜索和替换Visual Studio代码
- 如何缩进/格式选择的代码在Visual Studio代码?
- 如何禁用预览文件与点击在vs代码?
- Visual Studio代码更改文件资源管理器托盘的字体大小?
- 如何防止Visual Studio Code总是重新打开以前的文件或文件夹?
- VSCode单引号到双引号自动替换