Eclipse Indigo: shift+tab outdent (indentation) does not work anymore
Asked Answered
H

4

7

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?

Hydrodynamic answered 27/6, 2011 at 11:27 Comment(4)
Maybe this is related to the PHPeclipse plugin...Hydrodynamic
Same problem here (eclipse indigo with PHPEclipse), have you resolve this error?Ectoenzyme
same problem here, eclipse juno... did you solve it in the last year and half? :PFragile
@Fragile there is a new nightly build for PHPEclipse and it seems to work with Eclipse Juno :-)Hydrodynamic
C
12

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

Casas answered 11/9, 2013 at 16:48 Comment(2)
if default formatter profile is set then ... -> Formatter -> {your formatter profile} -> SHOW -> ..Roundlet
After applying google for-matter my Shift + tab wasn't working, but this solved me. ThanksPiranha
G
6

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.

find and replace screenshot showing exactly what to do

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.

enter image description here

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.

Glendon answered 15/5, 2015 at 5:36 Comment(1)
Seems like a pretty glaring bug, someone in the Eclipse open source community could fix?Chloroform
M
3

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.

Mercantilism answered 22/2, 2013 at 13:10 Comment(0)
A
1

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.

Asphyxiate answered 18/3, 2017 at 23:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.