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

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

    In VScode, they call this Copy Line Up and Copy Line Down

    From the menu, go to:

    File > Preferences > Keyboard Shortcuts

    Check already assigned keyboard shortcut for this, or adjust yours.

    Sometimes the default assigned shortcut may not work, mostly because of OS.

    In my Ubuntu, I adjusted this to: Ctrl+Shift+D

提交回复
热议问题