agusgambina
agusgambina

Reputation: 6679

Xcode 8 file indentation: How to set 2 spaces as default configuration?

I am trying to set the default indentation and tabs in Xcode 8.x to 2 spaces

In the utilities I changes the default values from 4 to 2

Xcode Text Settings screenshot

However nothing has changed. Did I miss something?

Upvotes: 13

Views: 8178

Answers (2)

darren102
darren102

Reputation: 2830

You have to go to every file and then to Command + A then Ctrl + I which will indent the file with the two spaces. That setting does not touch files already created in the project.

Upvotes: 9

Mike Swingler
Mike Swingler

Reputation: 289

If you want to do this for all projects, you can set this globally in the Text Editing / Indentation preferences:

Text Editing / Indentation

Upvotes: 23

Related Questions