Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing editor tab width in eclipse 3.5

Tags:

tabs

eclipse

I am trying to adjust the width of tabs from Window -> Preferences -> General -> Editors -> Text Editors where there is a field for "Display Tab Width". But no matter what I enter there the size of indentations when I start a newline in a Java file is 4. Any ideas?

like image 428
Neil Avatar asked Oct 30 '09 15:10

Neil


People also ask

How many spaces is a tab in eclipse?

UNIX text editors prefer tab is 8 spaces, Windows text editors, and IDEs e.g. Eclipse treats tabs as 4 spaces.

How do I organize tabs in eclipse?

You can rearrange the order of the view and editor tabs as you prefer in Eclipse. Just drag the tab(s) to the order you want.

How do I display tabs in eclipse?

Check the option " General > Editors > Text Editors > Insert spaces for tabs ": if unchecked, it will display tabs, not space.


1 Answers

Java files have a special place to edit this setting. You need to go to

Window -> Preferences -> Java -> Code Style -> Formatter

And edit the profile.

like image 51
Neil Avatar answered Sep 27 '22 20:09

Neil