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


当前回答

Mac:

重复行下:shift + option +↓

重复排列:shift + option +↑

其他回答

Ubuntu:

重复排列:Ctrl + Alt + Shift + 8 重复行下:Ctrl + Alt + Shift + 2

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

窗口:

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

Mac:

Shift +Option +↓或Shift +Option +↑

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

在键盘快捷键中搜索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"
}