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

烈酒焚心 提交于 2019-12-01 17:27:36

问题


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
*/

Is it possible to modify this behaviour? I would prefer to have no indentation within comment blocks.


回答1:


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!



来源:https://stackoverflow.com/questions/2218729/is-it-possible-to-change-the-way-xcode-indents-comment-blocks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!