1
votes

So I am trying to use spaces instead of tabs for my code. On Java and Javascript preferences (Java/Javascript => Code Style => formatter) both are using the built-in Eclipse profile.

So for the javascript one, I created a new profile (I called it "mine") based on the default and then changed the indentation settings to use spaces instead of tabs. The issue is that when I went to the Java preferences, I cannot find the new "mine" profile. I need to create another one and change it.

Instead of creating individual profiles for each code type, how can I edit the default profile so it uses spaces instead of tabs?

On General => Editors => Text Editors, I have enabled "Use spaces instead of tabs".

Thanks!

ps. I'm using a Mac but I believe the preferences are similar to the other OSes.

enter image description here

1

1 Answers

0
votes

There is no common setting for this. The Java and Javascript code formatters are completely separate and you have to edit the settings for both.

The 'General > Editors > Text Editors' setting is used when you are typing on code yourself. It is not used by the code formatters.