How to format code in Xcode? [duplicate]

北城余情 提交于 2019-11-28 15:06:12
Piotr Kochański

Select first the text you want to format and then press Ctrl+I.

Use Cmd+A first if you wish to format all text in the selected file.

Note: this procedure only re-indents the lines, it does not do any advanced formatting.

Key combination to format all text on open file:

Cmd ⌘ A + Ctrl I

Right click (Ctrl + Click) -> Structure -> Re-indent

Haven't used eclipse for a while, but, I think this is what you want... Remember select the code you want re-indented, then do this.

I would suggest taking a look JetBrains AppCode IDE. It has a Reformat Code command. I have come from a C# background and used Visual Studio with Jetbrains Resharper plugin, so learning AppCode has been a pleasure because many of the features in Resharper also exist in AppCode!

Theres too many features to list here but could well be worth checking out

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