加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – Xcode 9扩展/折叠括号/括号{}侧栏缺失

发布时间:2020-12-15 01:51:10 所属栏目:百科 来源:网络整理
导读:下找不到一个 Xcode ? Preferences/Text Editing ? “Code Folding Ribbon” box. 解决方法 Xcode 10中的更新: Xcode 10增加了对代码折叠的支持,包括: 一个新的代码折叠功能区,在编辑器中显示所有多行可折叠代码块 编辑器中折叠代码的新样式,允许您使用折
下找不到一个

Xcode ? Preferences/Text Editing ? “Code Folding Ribbon” box.

解决方法

Xcode 10中的更新:

Xcode 10增加了对代码折叠的支持,包括:

>一个新的代码折叠功能区,在编辑器中显示所有多行可折叠代码块
>编辑器中折叠代码的新样式,允许您使用折叠代码编辑行
>支持折叠括在花括号中的任何代码块
>支持折叠色带,结构化选择或来自折叠色带的折叠代码块

Menubar ? Editor ? Code Folding ? Fold menu item

enter image description here

看看这个快照:

enter image description here

Xcode 9

根据测试版发布说明:Xcode 9 Beta5,Xcode 9 beta 1中禁用了代码折叠功能.

方法如下:

>按住键盘上的?(命令)按钮,将鼠标光标移动/悬停在任何(开始或结束)括号上.它会自动突出显示,阻止区域.
>按住(按住)?(命令)按钮,然后单击突出显示的区域.它将启用带折叠选项的快捷菜单弹出窗口.
>从菜单列表中选择折叠.它将折叠您的代码并显示3个点,折叠/覆盖整个块.
>现在,再次展开代码块,释放?(命令)按钮,然后单击3个点折叠块.

为了便于理解,请查看此快照:

所有键盘快捷方式也都有效.

Fold                          ? ? ←      option + command + left arrow
Unfold                        ? ? →      option + command + right arrow
Unfold All                    ? U        option + U
Fold Methods & Functions      ? ? ↑      option + command + up arrow
Unfold Methods & Functions    ? ? ↓      option + command + down arrow
Fold Comment Blocks           ? ? ? ↑    control + shift + command + up
Unfold Comment Blocks         ? ? ? ↓    control + shift + command + down
Focus Follows Selection       ? ? ? F    control + option + command + F
Fold All                      ? ? ? ←    command + option + shift + left
Unfold All                    ? ? ? →    command + option + shift + left

Xcode菜单中的代码折叠选项:

Menubar ? Editor ? Code Folding ? “Here is list of code folding options”

这是ref快照:

Xcode快捷列表中的相同选项:

Menubar ? Xcode ? Preferences ? Key Bindings ? “Here is list of code folding short-keys”

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读