如何在 Xcode 中格式化代码? [英] How to format code in Xcode?

查看:34
本文介绍了如何在 Xcode 中格式化代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何格式化我的代码以使其整齐对齐?有没有类似于 Eclipse 的 ctrlshiftf 的功能?

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

推荐答案

先选择你要格式化的文本然后按Ctrl+I.

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

如果您希望格式化所选文件中的所有文本,请先使用 Cmd+A.

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.

重新缩进的新键绑定是control+I.

The new key binding to re-indent is control+I.

这篇关于如何在 Xcode 中格式化代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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