Trim trailing spaces in Xcode

后端 未结 7 2104

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:23

    For Xcode 8, I installed the swimat Xcode plug-in, for formatting Swift code, which removed all trailing spaces and whitespace-only lines.

    Installation Methods

    1. Install via homebrew-cask:

      brew cask install swimat
      
    2. Download the App directly:
      https://github.com/Jintin/Swimat/releases/download/v1.3.5/Swimat.zip

    3. Clone extension branch and archive to Mac App.

    Usage

    Once installed, you can run Swimat in Xcode via Editor -> Swimat -> Format.

    0 讨论(0)
提交回复
热议问题