Fix code indentation in Xcode

前端 未结 9 924
时光取名叫无心
时光取名叫无心 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:54

    Before Xcode 9 (for Xcode 9 see default shortcut below)

    1. select text
    2. right-click
    3. there's a "Re-indent selection" item in popup menu

    In XCode 4 there is one more step:

    1. select text
    2. right-click
    3. Click on "Structure"
    4. there's a "Re-indent selection" and other options in popup menu

    Or using the default shortcut:

    1. select text
    2. press ctrl + i

提交回复
热议问题