Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

Clang Formatter

  1. Install Alcatraz
  2. Install ClangFormat Plugin ClangFormat
  3. Restart Xcode
  4. Download .clang-format.yml to your home directory
  curl -L -o ~/.clang-format
  1. In Xcode select menu Edit -> Clang Format -> File to use rules from downloaded .clang-format file
  2. Use menu items Edit -> Clang Format -> Format * to format code
  3. (Optional) If you are a lazy ass, you can select Edit -> Clang Format -> Enable Format on Save, thus code will be formatted right before saving to a file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.