How do I duplicate a line or selection within Visual Studio Code?

前端 未结 17 2390
青春惊慌失措
青春惊慌失措 2020-12-04 04:38

Using Microsoft\'s Visual Studio Code, how do I duplicate a line of code and then move it up and down? (Similar to Sublime\'s cmd+shift+d be

17条回答
  •  孤城傲影
    2020-12-04 05:01

    Problem

    There seems to be a problem with the original "duplicate line down" shortcut on Ubuntu, mostly due to a conflict with an already existing workspace related shortcut on the operating system.

    Workaround

    However, an easy workaround is to simply ctrl+c (copies the entire line) and ctrl+v (pastes the copied line on to a new one)... Effectively, given you the same end result.

提交回复
热议问题