Can Uncrustify align colons in Objective-C method calls?

橙三吉。 提交于 2019-11-28 05:59:55

I played around with this for some time last night, and (although I don't think that this deserves the bounty) the answer to both your questions is "no, current versions (.53) of Uncrustify do not do this."

I even investigated writing a patch to do exactly this (because I really want it, too) and after looking at the Uncrustify source, and concluded it would take far more time than I had available to figure out where to insert the patch to accomplish "multi-line message parameter colon alignment" rather than "multi-line message left alignment" It does seem that there has been some improvements to Objective-C parsing in recent patches.

I was so hoping someone would answer this question. I really wanted to know, too.

NOTE: For people who find this answer in the future: The name of the preference in the .cfg file has been changed. It is now align_oc_msg_colon_span = 1 to get the behavior described above. There is also now a align_oc_decl_colon that will do the name thing for multi-line declarations.

Did you try:

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