我试图找到在Visual Studio代码中复制一行的快捷方式(我使用1.3.1),我尝试了明显的CTRL + D,但似乎不起作用。


当前回答

根据操作系统的不同,可以使用以下方法:

窗口:

Shift+ Alt + ↓ 或 Shift+ Alt + ↑

Mac:

Shift +Option +↓或Shift +Option +↑

Linux:

Ctrl+Shift+Alt+↓或Ctrl+Shift+Alt+↑

注意:对于一些linux发行版使用Numpad箭头

其他回答

使用以下方法:Shift + Alt+(↓或↑)

根据操作系统的不同,可以使用以下方法:

窗口:

帽子Shift + Alt +↓还是是Shift + Alt +↑。

Mac:

Shift +Option +↓或Shift +Option +↑

复制可以通过CTRL+C和CTRL+V实现,光标在行中,没有任何选择。

在键盘快捷键中搜索copyLinesDownAction或copyLinesUpAction

通常为SHIFT+ALT+↓

另外2个非常有用的快捷键是上下移动选定的行,就像sublime text…

{
  "key" : "ctrl+shift+down", "command" : "editor.action.moveLinesDownAction",
  "when" : "editorTextFocus && !editorReadonly"
},

and

{
  "key" : "ctrl+shift+up", "command" : "editor.action.moveLinesUpAction",
  "when" : "editorTextFocus && !editorReadonly"
}