缩进Xcode中的连续行

nsc*_*hum 5 xcode indentation

我可以使用Xcode的自动缩进来缩进延续线吗?

我想要:

BOOL someLongVariableName = someLongValue
    | someOtherLongValue
    | moreLongValues

BOOL someOtherLongVariableName =
    someEvenLongerValue;

[someLongVariableName
    performSomeAction:someLongArgument]
Run Code Online (Sandbox Code Playgroud)

我目前得到:

BOOL someLongVariableName = someLongValue
| someOtherLongValue
| moreLongValues

BOOL someOtherLongVariableName =
someEvenLongerValue;

[someLongVariableName
 performSomeAction:someLongArgument]
Run Code Online (Sandbox Code Playgroud)

要明确:

  • 我使用显式换行而不是自动换行.
  • 我希望在编辑时和按下返回后立即缩进,而不是在运行外部程序(如uncrustify)之后.

Rol*_*and -1

或者尝试 xcode-preferences-text editor-indentation:检查语法感知缩进,检查“Return”的自动缩进。