Eclipse Indigo:shift+tab outdent(缩进)不再起作用
安装新的 Eclipse Indigo 后,当我在一行上按 Shift+Tab 时,突出缩进不再起作用。有没有什么设置可以再次激活它?
After installing the new Eclipse Indigo, the outdent does not work anymore when I press shift+tab on a line. Is there any setting which activates this again?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
主菜单中的Eclipse Kepler 问题仍然存在
->窗口->首选项-> PHP->格式化程序-> {您的格式化程序配置文件} ->编辑->鉴定->常规设置:
将选项卡策略更改为空格,并将缩进大小更改为 4(或任何所需的数量)。
来源:https://bugs.eclipse.org/bugs/show_bug.cgi?id=210108
Problem still actual for Eclipse Kepler
in Main Menu -> Window -> Preferences -> PHP -> Formatter -> {your formatter profile} -> Edit -> Identation -> General Settings:
change tab policy to Spaces and indentation size to 4 (or any desired amount).
Source: https://bugs.eclipse.org/bugs/show_bug.cgi?id=210108
好的,我目前正在使用 Eclipse Luna Service Release 1a (4.4.1),并且在从空白制表符(4 个空格)而不是标准制表符间距切换后也遇到了这个问题。
对我来说,问题是我试图取消制表符/outdent/shift-制表符(或者任何你想称呼的名称)的区域混合了 4xspaces 和实际制表符。
检查您是否属于这种情况。如果是,您应该进行从一种到另一种的转换。为此,请突出显示受影响区域中的所有内容,然后按 CTRL+F 并将您正在使用的所有空格替换为“\t”。
确保选中“正则表达式”标志。
只有在仅制表符或仅空格用于缩进时,SHIFT+TAB 似乎才能正常工作,如果混合使用,则根本不会执行任何操作.
另外,自然地,确保正确的设置应用于主菜单 -> 中的选项卡策略窗口->首选项-> PHP->格式化程序-> {您的格式化程序配置文件} ->编辑->鉴定->常规设置。
自从我这样做以来,该功能工作正常并且符合我的预期。请务必重新启动 IDE,因为我观察到,如果不这样做,它会以奇怪的方式微妙地倾向于遵循旧的 Tab 键切换习惯。
Okay, so I am currently using Eclipse Luna Service Release 1a (4.4.1) and I was experiencing this problem too after switching from whitespace tabbing (4 spaces) instead of standard tab spacing.
The problem for me was that the area I was trying to de-tab/outdent/shift-tab (or whatever you want to call it) had a mix of 4xspaces and actual tabs in it.
Check if this is the case for you. If it is, you should do the conversion from one to the other. To do this, highlight everything in the effected area, then CTRL+F and replace all instances of however many spaces you are using, with "\t".
Make sure that the "Regular expressions" flag is checked.
SHIFT+TAB only seems to work correctly if only tabs or only spaces are used for indentation and won't do anything at all if there is a mix.
Also, naturally, ensure that the correct settings are applied for your tab policy in Main Menu -> Window -> Preferences -> PHP -> Formatter -> {your formatter profile} -> Edit -> Identation -> General Settings.
The functionality works fine and as intended for me since I did this. Make sure to restart the IDE as I have observed that it will subtly tend to stick to old tabbing habits in strange ways if you do not.
它可能与格式化程序设置有关(首选项->java->代码样式->格式化程序)。我今天在 Eclipse Juno 上遇到了同样的问题,并通过在缩进选项卡中将缩进大小设置为 4 并将选项卡大小设置为 4 来解决它。尝试一下这些设置可能是值得的。
It may have something to do with the formatter settings (preferences->java->code style->formatter). I've experienced today the same problem on Eclipse Juno and managed to solve it by setting the indentation size to 4 and the tab size to 4 in the indentation tab. It might be worth to give it a go and play with these settings.
对于那些其他答案都不起作用的人,只需尝试安装 PDT(Php 开发工具)即可。它具有执行此操作的正确热键。我是这样解决的。
For those who none of the other answers worked, just try to install PDT (Php Development Tools). It has the right hot keys for performing this action. I solved this way.