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

前端 未结 17 2397
青春惊慌失措
青春惊慌失措 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 04:52

    For those migrating from WebStorm/PhpStorm,

    You could install IntelliJ IDEA Keybindings to keep using almost all the keyboard shortcuts as you did in Webstorm/Phpstorm.

    So,

    • Duplicate lines => CTRL + D
    • Move a line/selection of code Up/Down => Ctrl + Shift + UP/DOWN

    Also, here is a list of recommended VS Code extensions that will make your transition from WebStorm/Phpstorm much easier.

提交回复
热议问题