Show Indent Guide Lines In Xcode

拈花ヽ惹草 提交于 2019-12-07 00:21:26

问题


Coming from a background using Visual Studio and Notepad++ I'm used to the indent guides which help to visually enhance sections of code where the curly braces are used,

Xcode (No indent guides)

Visual Studio (Nice tidy indent guides)

As you can see from the images above sometimes there are sections of code where multiple levels of curly braces are open and it gets messy without any indent guides. Are there any options or plugins that will allow xcode to display the indent guides in between sections of code? Like the VS2010 sample?


回答1:


Xcode doesn't have this feature (not that I'm aware of) , but it has a (kinda) similar one. If you look closely in a method with a few loops or if structures, each structure gets a black tint on the left side of the editing area (right next to the line numbers).

You can collapse or expand the functions as needed.




回答2:


In Xcode 10, if you press Command and hover over the structure it will show what is desired. It is not permanent but it helps.



来源:https://stackoverflow.com/questions/9167825/show-indent-guide-lines-in-xcode

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