Xcode是否有整理代码的捷径? [英] Is there any short cuts for Xcode to tidy up the code?

查看:84
本文介绍了Xcode是否有整理代码的捷径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,我有这样的东西:

  aVarible = 123; 
bIndex = 234;
cSomethingVerylong = 456;

我想要这样的代码:

  aVarible = 123; 
bIndex = 234;
cSomethingVerylong = 456;

我该怎么做?谢谢。

解决方案

您可以使用uncrustify:



http://uncrustify.sourceforge.net/



I不要使用它,所以我不能保证它的质量,但是它确实声称可以完全按照您在问题中的建议进行操作。如果这只是您想做的所有事情,那可能是过大了,但是如果您想通过多种方式整理您的代码,那么这就是令人生硬的目的。


for example, I have something like this:

aVarible = 123; 
bIndex = 234; 
cSomethingVerylong = 456;

And I would like to intent the code like this:

aVarible           = 123; 
bIndex             = 234; 
cSomethingVerylong = 456;

How can I do so? Thank you.

解决方案

You could use uncrustify:

http://uncrustify.sourceforge.net/

I don't use it, so I cannot vouch for its quality, but it does claim to do exactly what you suggest in your question. If that's all you want to do, it's probably overkill, but if you want to "tidy" your code in a number of ways, then that's what uncrustify is there for.

这篇关于Xcode是否有整理代码的捷径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆