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

天涯浪子 提交于 2019-12-03 02:34:30

问题


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?


回答1:


In Visual Studio Code for Mac...

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

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

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




回答2:


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.




回答3:


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").



来源:https://stackoverflow.com/questions/46775952/how-to-move-a-line-up-or-down-in-visual-studio-code-for-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!