Eclipse 键盘快捷键将源代码缩进到左边?

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

Eclipse keyboard shortcut to indent source code to the left?

eclipsekeyboard-shortcuts

提问by LowFatTwinkie

I've looked in the keyboard shortcuts list in Eclipse but can't find keyboard shortcut to indent source code to the left. Surely there is one?

我查看了 Eclipse 中的键盘快捷键列表,但找不到将源代码缩进左侧的键盘快捷键。肯定有吗?

回答by jwismar

In my copy, Shift+ Tabdoes this, as long as I have a code selection, and am in a code window.

在我的副本中,Shift+Tab执行此操作,只要我有一个代码选择,并且在代码窗口中。

回答by Oren Nitzan

Ctrl+ I(indentation). See at http://www.rossenstoyanchev.org/write/prog/eclipse/eclipse3.htmlSearch for Indentation.

Ctrl+ I(缩进)。请参阅http://www.rossenstoyanchev.org/write/prog/eclipse/eclipse3.html搜索缩进。

回答by yellavon

You can use Ctrl+ Shift+ Fwhich will run your formatter on the file and fix indentations along the way also.

您可以使用Ctrl+ Shift+ F,这将运行上沿也顺便文件和修复缺口格式。

回答by CookieOfFortune

I thought it was Shift+ Tab.

我以为是Shift+ Tab

回答by Raghu

control+ shift+ Fwill do the work

control+ shift+F会做的工作

回答by jjisnow

Obviously this is only for Pydev, but I've worked out that you can get the very useful functions "Shift Right" and "Shift Left" (mapped by default to CTRL+ALT+.and CTRL+ALT+,) to become useful by changing their keybindings to "Pydev Editor Scope" from "Pydev View"

显然这仅适用于 Pydev,但我已经发现您可以通过将它们的键绑定更改为“来获得非常有用的功能“右移”和“左移”(默认映射到CTRL+ ALT+.CTRL+ ALT+ ,)变得有用“Pydev 视图”中的“Pydev 编辑器范围”

回答by HassanUsman

For Left indentShift+ Tab

对于Left indentShift+Tab

For Right indentsimple Tab

Right indent简单Tab

回答by user3227986

In any version of Eclipse IDE for source code indentation.

在任何版本的 Eclipse IDE 中进行源代码缩进。

Select the source code and use the following keys

选择源代码并使用以下键

  1. For default java indentation Ctrl+ I

  2. For right indentation Tab

  3. For left indentation Shift+ Tab

  1. 对于默认的 java 缩进Ctrl+I

  2. 对于正确的缩进 Tab

  3. 对于左缩进Shift+Tab

回答by Swap-IOS-Android

On Mac (on french keyboard its) cmd+ shift+ F

在 Mac 上(在法语键盘上)cmd+ shift+F

回答by rakesh

Tab to indent right by four characters

Tab 向右缩进四个字符