Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Eclipse, how can spaces behave as tabs?

Tags:

eclipse

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.

But when I hit backspace to remove an indentation level (a tab), it removes only one space. So I have to hit 4 times space to remove an indentation level.

That is one of the most absurd thing I've seen in Eclipse, so I guess there is an option somewhere to enable us to remove 4 spaces as if it where a tab ? or a plugin ?

like image 896
Matthieu Napoli Avatar asked Mar 31 '10 08:03

Matthieu Napoli


People also ask

Does Eclipse use tabs or spaces?

Eclipse - Tab to spaces And eclipse uses tabs for spaces by default. Tabs are always dependent on the environment and use 4 spaces in windows. If you use source code written with tab spaces, code is consistent across different environments.

How spaces are in a tab?

Generally, a tab is the same width as 4 to 5 spaces provided the font being used equally sizes each character. For example, the Courier font's tab equals 5 spaces, whereas the Arial font is 11 spaces to each tab when the font size for both is set to 12.

How do I get tabs in eclipse?

Ctrl + H > File Search tab.


1 Answers

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.

like image 90
Tjkoopa Avatar answered Sep 19 '22 14:09

Tjkoopa