开发者

How to disable the auto-indentation of Xcode?

开发者 https://www.devze.com 2023-02-19 17:33 出处:网络
How can I disabl开发者_如何学编程e the feature that when I hit \"return\" the cursor will be placed on the next line with tabs?Xcode - preference(or press keys command+,) - Indentations

How can I disabl开发者_如何学编程e the feature that when I hit "return" the cursor will be placed on the next line with tabs?


Xcode - preference(or press keys command+,) - Indentations

There you can disable it.


For Xcode 7 (and presumably from at least Xcode 5) you can turn off auto indentation from preferences. That is either hit command+, (i.e. comma), or Xcode > Preferences..., and then select Text Editing > Indentations where you can remove the tick in front of Automatically indent based on syntax close to the middle of page.


Exact Steps For XCode 3.2.6:

XCode, Preferences, Indentation, "Syntax Aware Indenting" Section,

Under "Automatically indented characters", uncheck "Return"

Also, The XCode User Defaults document from Apple (which may require a devloper login to view), provides much more fine grained control over the XCode IDE.

To set and then readback indivdual settings use something like:

defaults write com.apple.XCODE PBXIndentOnPaste No
defaults read com.apple.XCODE PBXIndentOnPast


The XCode User Defaults document is obscolete for Xcode 6 --- at least none of the things that it documents seem to work any more. Also, there's no way to turn off auto indent (in the sense of matching the indent level of the previous line) from the Preferences menu. Disabling all options in that menu does not disable this behavior. Anybody have any how to actually solve this problem?

0

精彩评论

暂无评论...
验证码 换一张
取 消