vil*_*ane 512
Visual Studio Code 0.2现在提供了更多的多光标功能:
多光标改进
Ctrl+D选择光标下的下一个字或当前选择
Ctrl+K Ctrl+D将最后添加的光标移动到光标下当前选择的下一个字或当前选择下
的命令默认情况下使用matchCase.如果查找窗口小部件已打开,则查找窗口小部件设置(matchCase/matchWholeWord)将用于确定下一次出现
Ctrl+U撤消最后一个光标操作,因此如果您添加了太多光标或出错,您可以按Ctrl+U返回到前一个游标状态.向上或向下添加光标(Ctrl+Alt+Up/ Ctrl+Alt+Down)现在会显示最后添加的光标,以便更容易在一次超过1个视口高度上使用多个光标(即选择300条线,只有80条适合视口).这使得引入多个游标变得更加容易
按Alt,然后单击.适用于Windows和Linux*,也适用于Mac.
*一些发行版(例如Ubuntu)将窗口拖动到Alt+LeftMouse,这将与VSCode冲突.您可以使用gsettings
其他答案中提到的更改此设置.
小智 135
我有ALT键的问题,修复是alt+click
作为一个Gnome热键改变,在VSCode中使用多个游标选择,super+click
通过运行:
gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier "<Super>"
Run Code Online (Sandbox Code Playgroud)
资料来源:http://2buntu.com/articles/1529/visual-studio-code-comes-to-linux/
Dav*_*itt 135
Windows/OS X:
对于多行选择,Ctrl+Alt+Down/ Cmd+Alt+Down会将您的选择或光标位置扩展到下一行.Ctrl+Right/ Cmd+Right无论多长时间,都会移动到每一行的末尾.要逃避多线选择,请点击Esc.
请参阅VS Code键绑定(操作系统敏感)
Tar*_*kiv 112
2017年5月
从版本1.13开始,使用Ctrl/ Cmd+ 添加多个游标Click
VSCode
开发人员已经引入了一个新设置,editor.multiCursorModifier
用于更改修改键,以便在Windows和Linux 上将多个游标应用于Cmd+ Click
on macOS和Ctrl+ Click
.这使得来自其他编辑器(如Sublime Text或Atom)的用户可以继续使用他们熟悉的键盘修饰符.
设置可以设置为:
ctrl/Cmd
- Ctrl在Windows和CmdmacOS上映射到.alt
- 现有默认值Alt.还有一个新的菜单项使用Ctrl+ Click
用于Multi-Cursor
在Selection
菜单快速切换此设置.
在转到定义和打开链接手势也将尊重这个设置和调整,使得它们并不冲突.例如,当设置为ctrl/Cmd
,可以使用Ctrl/ Cmd+ 添加多个游标Click
,并且可以使用Alt+ 调用打开链接或转到定义Click
.
通过修复问题#2106,现在可以通过在现有选择之上使用相同的手势来移除光标.
小智 76
尝试Ctrl+ Alt+ Shift+ ⬇/⬆,不用鼠标,或按住"alt"并单击所需的所有行.
注意:在Windows上测试.
小智 30
在Ubuntu上,为了启用多光标点击,您需要先通过运行以下命令重新分配Alt + click.这是因为默认情况下Ubuntu使用快捷方式本身,并且优先级高.
> gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier "<Super>"
Run Code Online (Sandbox Code Playgroud)
lav*_*ava 24
在XFCE上,转到 Applications -> Settings -> Settings editor - > xfwm4 -> easy_click(disable value)
现在你可以Insert Cursor
用Alt+点击
我还禁用了L/R工作区(ctrl+ alt+ L/R)设置Settings -> Window manager -> Keyboard
小智 21
从Visual Studio代码版本0.10.9开始,您现在可以通过选择多行并按下来从所选行创建多个游标Shift+Alt+I
注意:这与Sublime Text的Ctrl+Shift+L功能类似.
资料来源:https://code.visualstudio.com/updates/vJanuary#_thank-you
相关公关:https://github.com/Microsoft/vscode/pull/1479
int*_*ion 18
对于你想要的东西没有任何约束力.
唯一接近的是Ctrl+ F2将同时选择所有这些.
您可以将其绑定到Ctrl+ D执行以下操作:
File > Preferences > Keyboard Shortcuts
它应该看起来像这样:
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "ctrl+d", "command": "editor.action.changeAll",
"when": "editorTextFocus" }
]
Run Code Online (Sandbox Code Playgroud)
Ctrl+ Alt+ ⬇/⬆在当前行的上方和下方添加游标.尽管如此,仍然远不如崇高或括号那么好.在键盘快捷键文件中,我无法在sublime中看到与Ctrl+ 相当的任何内容D.
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).
Run Code Online (Sandbox Code Playgroud)
选择多光标的快捷方式改为cmd + d(与Sublime Text相同.大声笑)
我们可以期待下一版本支持更多关于多光标的方便功能;)
小智 7
在没有鼠标的Visual Studio中:Alt+ Shift+ { Arrow }.
在我的 XFCE(4.12 版)中,它位于Settings -> Window Manager Tweaks -> Accessibility
.
有一个下拉字段Key used to grab and move windows:
,将其设置为None
.
Alt + 单击现在可在 VS Code 中添加更多光标。
您可以根据“选择”菜单执行以下操作:
根据需要按下/按住Alt+Ctrl+Up Arrow/Alt+Ctrl+Down Arrow 创建足够的光标,然后Ctrl+D可用于扩展选择。
归档时间: |
|
查看次数: |
348662 次 |
最近记录: |