Fix code indentation in Xcode

前端 未结 9 943
时光取名叫无心
时光取名叫无心 2020-12-13 03:20

Once I start editing my code and adding for loops or if then statements my code indentation is whacked because the previous code maintains its former indentation instead of

9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-13 03:36

    In Xcode 4.6.3, choose Editor > Structure > Re-Indent.

    Shortcut: Control + I (that's 'i', for 'indent')

    This works on current selection. If no text selected, choose Edit > Select All (⌘+A) and then perform the re-indent.

    (I'm more clearly restating the other answers)

提交回复
热议问题