sean-parent / tools

A place for scripts and tooling I find useful
32 stars 4 forks source link

Direction for Usage is not clear #5

Open super-brian opened 5 years ago

super-brian commented 5 years ago

First, I want to thank Sean Parent. Help me use it. So, I followed everything to install it, by making a folder 'xcode' in my home directory, and then it has 'tools' directory. I made a file called '.clang-format' which has this as its content:

UseTab: Never
IndentWidth: 4
BreakBeforeBraces: Allman
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
ColumnLimit: 0

Then, since I didn't change the shortcut for cmd+c or cmd+v, I didn't edit any other file. Then... do I have to select all contents of the file to format it? Is it automatically format the file whenever I save the file? Would you clarify how to use it? Do I have to restart xcode after setting it? It looks like nothing works...

super-brian commented 5 years ago

Oh, the in order to use it, I have to select the text, then choose from menu, Xcode > behaviors > xcode-format, right? well then my code looks really bad. Could you share your '.clang-format' file that works good with swift?