有没有办法将其他源代码的缩进样式转换为不同的缩进样式

Is there a way to convert indentation style of other's source code to a different one

Ray Wenderlich 的教程更喜欢 2 个空格的缩进样式,但我更喜欢 4 个空格的缩进样式。当我对 Ray Wenderlich 的源代码进行一些更改时,缩进样式变得一团糟。有没有办法一步一步把Wenderlich的源代码缩进风格改成新的?

在XCode 7.1中:select代码中没有按照您喜欢的方式缩进的部分,右键单击,然后select 'Structure'然后'Re-indent'.这应该根据您的默认首选项重新缩进(参见 'Preferences'、'Text Editing,'、'Indentation')。