Search code examples
xcodexcode4

Copy and pasting text between files causes leading whitespace to be trimmed in Xcode


In Xcode 4, I'm having a problem with leading white space (it's being trimmed), when copy and pasting between files. In the hex dump, I see 0x20s in the source, but not in the copy; this means the text is being changed on paste.

In preferences > text editing > indentation, I have prefer indent using: spaces and tab key: indents in leading white space set.

This doesn't happen on trailing whitespace. How can I fix this problem?


Solution

  • In that same Preferences > Text Editing > Indentation screen, try unchecking the Syntax-aware indenting option.