Trim trailing spaces in Xcode

后端 未结 7 2116

Is there a way to force Xcode to trim trailing whitespaces when I save file?

I\'m using version 3.1.3 if that matters.

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-30 01:02

    Starting from Xcode 4.4 whitespaces will be trimmed automatically by default, unless the line is all whitespace. You can also activate Including whitespace-only lines to fix this, which is not active by default.

    Go to Xcode > Preferences > Text Editing > While editing

    Xcode preferences screenshot

提交回复
热议问题