eclipse 缩进多行:键盘快捷键

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18176698/
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-10 21:51:11  来源:igfitidea点击:

Indenting multiple lines: Keyboard shortcut

eclipse

提问by Matt

I think I was told once how to indent an entire collection of lines quickly and at the same time with a keyboard shortcut in Eclipse (I'm using Juno with PyDev-Python). Does anyone know of such a shortcut? I can't seem to dig anything up.

我想我曾经被告知如何使用 Eclipse 中的键盘快捷键快速缩进整个行集合(我将 Juno 与 PyDev-Python 一起使用)。有谁知道这样的快捷方式?我似乎无法挖掘任何东西。

Thanks.

谢谢。

回答by Towler

Just highlight the lines and push tab.

只需突出显示线条并按标签即可。

回答by GGrec

Select all, then do Ctrl+I.

全选,然后执行Ctrl+ I

The advantage of this method over selecting some lines, then pressing Tab, is that it is much faster to do Ctrl+Athen Ctrl+I, than tabbing lines at a time. I do automatic indenting all the time, it's basically in my reflex. Like saving.

与选择一些行然后按 相比,此方法的优点Tab是执行Ctrl+A然后Ctrl+I比一次跳行要快得多。我一直在做自动缩进,这基本上是我的条件反射。喜欢储蓄。

A quick googlingwould have helped you faster.

快速谷歌搜索会帮助你更快。

回答by Chinmoy

Select the lines and Press TAB - for Right

选择线条并按 TAB - 为右侧

Select the lines and Press SHIFT+TAB - for Left

选择行并按 SHIFT+TAB - 为左