问题描述
我试图找到在 Visual Studio Code 中复制一行的快捷方式(我使用的是 1.3.1)我尝试了明显的 + 但这并没有似乎行不通.
点击文件 > 首选项 > 键盘快捷键:
在键盘快捷键中搜索 copyLinesDownAction
或 copyLinesUpAction
通常是+ +
Ubuntu 更新:
Ubuntu 似乎隐藏了 VSCode 无法看到的快捷方式(即它可能自己使用它).GitHub 上有一个关于此的问题.
为了在 Ubuntu 中工作,您必须定义自己的快捷方式,例如使用 +++ 和 + 复制该行 + + 你可以像这样使用 keybindings.json
:
I am trying to find the shortcut for duplicating a line in Visual Studio Code (I am using 1.3.1) I tried the obvious + but that doesn't seem to work.
Click File > Preferences > Keyboard Shortcuts:
Search for copyLinesDownAction
or copyLinesUpAction
in your keyboard shortcuts
Usually it is + +
Update for Ubuntu:
It seems that Ubuntu is hiding that shortcut from being seen by VSCode (i.e. it uses it probably by its own). There is an issue about that on GitHub.
In order to work in Ubuntu you will have to define your own shortcut, e.g. to copy the line using +++ and + + + you could use a keybindings.json
like this:
[
{ "key": "ctrl+shift+alt+j", "command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly" },
{ "key": "ctrl+shift+alt+k", "command": "editor.action.copyLinesUpAction",
"when": "editorTextFocus && !editorReadonly" }
]
这篇关于Visual Studio Code 中的重复行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!