Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何启用行号旁边的代码折叠栏?
我用谷歌搜索了“代码折叠 Mac”;这完全是关于触发代码折叠和展开,但与启用栏无关。
我曾尝试使用Editor -> Code Folding -> Fold/Unfold折叠和展开代码,但行号旁边没有竖线;所以,我有按钮可以点击折叠和展开。
Editor -> Code Folding -> Fold/Unfold
如何启用该栏?
.
我总是遇到这种情况,突然我不小心隐藏了 Code 折叠丝带。因此,从@PetahChristian 的回答中,我用屏幕截图捕获了它。
Xcode > 首选项 > 文本编辑 > 检查“代码折叠功能区”
转到首选项 -> 文本编辑,然后单击显示代码折叠功能区。
Updated Answer for Xcode 12 and above Code folding ribbon is quite useful and easy to view code scope.
Go to Preferences -> Text Editing -> Display, and click on Code folding ribbon