I have replaced all my tabs by spaces in my PHP code source (and I configured Eclipse to use 4 spaces as tabs). When I hit tab, I get 4 spaces, that\'s OK.
After all this time, no solution.
I'm considering this as impossible then : there is no solution.
So... I also need that feature. Before a began to use Eclipse, I was a Vim user. Actually a still use it for some edit task. There is a vimplugin for eclipse, so you can use it as your Eclipse editor. But its a matter of taste.
You can configure vim to do exactly that: Tab insert 4 spaces. Backspaces deletes indentations.
Here the config for your settings:
set tabstop=8 " This is the default in any editor, Tabs are 8spaces Wide"
set expandtab " Tabs are converted to spaces"
set softtabstop=4 " Tabs are 4 spaces"
set shiftwidth=4 " Indent is 4 spaces"
" Here the magic"
set backspace=indent,eol,start " Deletes over indent, line breaks, edit starts"
HTH
Don't think there is a way to set it to delete the entire space indentation with backspace, but shift+tab should do what you want.
9+ years later, space will behave as tab when it comes to deletion.
With Eclipse 4.14 (part of the Eclipse 2019-12 simultaneous release, available December 18, 2019), you can use delete spaces as tabs
See "Backspace/delete can treat spaces as tabs"
If you use the Insert spaces for tabs option, now you can also change the backspace and delete keys behavior to remove multiple spaces at once, as if they were a tab.
The new setting is called
Remove multiple spaces on backspace/delete
and is found on theGeneral > Editors > Text Editors
preference page.