Search code examples
xcodexcode8

Change default indentation width in Xcode 8


I know how to change code indentation in a single project and found a solution for changing default indentation in Xcode 4.5.

But in Xcode 8 there is no such item in "Preferences" as "Indent width".

So how can I make my Xcode create all the new projects with indentation of 2 spaces intead of 4?


Solution

  • In the Xcode menu, go to Preferences (or command ⌘ + ,) then Text Editing > Indentation :

    Text Editing Indentation