-2

When you type in most kinds of lines of codes into Xcode, it spaces automatically as it is supposed to: it inserts as many spaces as your tab is set to (default four) for every indent. When you press enter, it jumps to this spot. But, when you type in a # to use a preprocessor statements, it deletes all of those spaces, and your line of code is at the beginning.

Xcode sets it to this:

    blah blah blah
#doSomething
    blah blah blah

But I think it looks better like this

    blah blah blah
    #doSomething
    blah blah blah

EDIT: Reason for why it is like this below from Brainless Box.

This can get pretty annoying, and obstructs your creation of code and slows productivity.

Is there anyway to fix this?

Eliza Wilson
  • 1,031
  • 1
  • 13
  • 38

1 Answers1

0

Some old C compilers required that preprocessor statements have no leading spaces and be flush with the left margin, and it carried on through many languages. See Should preprocessor instructions be on the beginning of a line?

Community
  • 1
  • 1
Brainless Box
  • 587
  • 9
  • 16