如何在 Eclipse 中向左或向右移动多行代码?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25604736/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 05:24:13  来源:igfitidea点击:

How to move multiple lines code together left or rights in Eclipse?

eclipse

提问by Koenigsegg

I want to select multiple lines and move them together (left/right/up/down). How to do that?

我想选择多行并将它们一起移动(左/右/上/下)。怎么做?

回答by tobias_k

Moving lines left or right, i.e. changing the level of indentation, can be done in almost all code editors using Taband Shift+Tab.

向左或向右移动行,即更改缩进级别,几乎可以在所有使用TabShift+ 的代码编辑器中完成Tab

Moving blocks of code up and down can be done in Eclipse using Alt+upand Alt+down.

可以使用Alt+upAlt+在 Eclipse 中上下移动代码块down

See Preferences -> General -> Keys.

请参阅首选项 -> 常规 -> 键