且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Xcode中格式化代码?

更新时间:2022-10-15 07:42:49

选择要格式化的文本,然后按 Ctrl + I



使用 Cmd + A 首先如果您想格式化所选文件中的所有文本。



注意:此过程只重新缩进行,它并不 做任何高级格式化。


I wonder how can I format my code to align it neatly? Does it have a feature similar to Eclipse's ctrlshiftf?

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.