How to Move a Line Up or Down in Visual Studio Code for Mac

前端 未结 4 637
再見小時候
再見小時候 2021-01-30 19:27

I\'m familiar with how to move a line up or down in other editors, like Atom and Sublime.

How is this done in Visual Studio Code for Mac?

相关标签:
4条回答
  • 2021-01-30 19:58

    You can find the corresponding commands in the Selection menu (Move Line Up and Move Line Down) together with currently set short-cuts.

    Additionally, if you launch the command palette (View/ Command Palette) while you have an open document you also find them there (type "move" or "line").

    0 讨论(0)
  • 2021-01-30 20:05

    For Windows :

    To move a line UP: alt + ↑ (alt + up arrow keys)

    To move a line DOWN: alt + ↓ (alt + arrow down keys)

    0 讨论(0)
  • 2021-01-30 20:20

    In Visual Studio Code for Mac...

    To move a line UP: + (alt + up arrow key)

    To move a line DOWN: + (alt + down arrow key)

    See here for a reference on Basic Editing Key Bindings in Visual Studio Code.

    0 讨论(0)
  • 2021-01-30 20:20

    In Visual Studio Code for Mac for me it is:

    To move a line UP: +shift+ (alt + shift + up arrow keys)

    To move a line DOWN: +shift+ (alt + shift + arrow down keys)

    I do have IntelliJ IDEA Keybindings installed.

    0 讨论(0)
提交回复
热议问题