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
Eclipse keyboard shortcut to indent source code to the left?
提问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 indent
Shift+ Tab
对于Left indent
Shift+Tab
For Right indent
simple 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
选择源代码并使用以下键
For default java indentation Ctrl+ I
For right indentation Tab
For left indentation Shift+ Tab
对于默认的 java 缩进Ctrl+I
对于正确的缩进 Tab
对于左缩进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 向右缩进四个字符