Is it possible to change the way Xcode indents comment blocks?

后端 未结 1 962
春和景丽
春和景丽 2021-01-18 12:06

By default, Xcode automatically indents multiple lines of code within C-style comment blocks by one space:

/* this is a comment block
 line 1
 line 2
*/


        
相关标签:
1条回答
  • 2021-01-18 12:31

    This is not a complete answer, but Xcode has code formatting options under the key XCCodeSenseFormattingOptions.

    You can set the options via command line or by editing the plist:

    defaults write com.apple.Xcode XCCodeSenseFormattingOptions -dict PreExpressionsSpacing  "" PreCommaSpacing " "
    

    Unfortunately, I cannot find any setting for the one space indentation in comment blocks, and it makes me crazy!

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