有没有办法让空白在 Xcode 编辑器中可见?

发布于 2024-07-20 05:49:41 字数 49 浏览 5 评论 0原文

我希望制表符和空格在 Xcode 中可见。 这可能吗? 我在偏好设置下找不到它。

I want the tabs and spaces to be visible in Xcode. Is this possible? I can't find it under preferences.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

云巢 2024-07-27 05:49:41

编辑-> 在 Xcode 4 中显示不可见项

Editor -> Show Invisibles in Xcode 4

青春如此纠结 2024-07-27 05:49:41

在 Xcode 7 及更高版本中,此命令已移至编辑器菜单:

Editor > 显示隐形

编辑器> 隐藏不可见

编辑

从 Xcode 12.1 开始,菜单项现在简称为Invisibles。 当显示不可见物体时它被选中,当它们不显示时它被取消选中。

此外,看起来 Xcode 现在使用非常浅的蓝色点表示空格,并使用粗体浅蓝色点表示与选项卡位置相对应的空格,这非常好。

In Xcode 7 and later, this command has moved to the Editor menu:

Editor > Show Invisibles

or

Editor > Hide Invisible

Edit

As of Xcode 12.1, the menu item is now simply called Invisibles. It's checked when invisibles are shown, and un-checked when they are not shown.

Further, it looks like Xcode now uses very light blue dots for spaces, and bold light blue dots for the spaces that correspond to your tab positions, which is very nice.

燕归巢 2024-07-27 05:49:41

您还可以使用默认值读取/写入 Xcode plist

中使用/测试

这在 Xcode 6.1 GUI

Editor->Show Invisibles

CLI

打开它

defaults write com.apple.dt.Xcode DVTTextShowInvisibleCharacters 1

打开它离开

defaults write com.apple.dt.Xcode DVTTextShowInvisibleCharacters 0

You can also use defaults to read/write to the Xcode plist

This is used/tested in Xcode 6.1

GUI

Editor->Show Invisibles

CLI

Turn it on

defaults write com.apple.dt.Xcode DVTTextShowInvisibleCharacters 1

Turn it off

defaults write com.apple.dt.Xcode DVTTextShowInvisibleCharacters 0
╰ゝ天使的微笑 2024-07-27 05:49:41

自 Xcode 11 起:

在菜单中选中/取消选中:
编辑器-> 隐形人

Since Xcode 11:

In the menu check/uncheck:
Editor -> Invisibles

独自唱情﹋歌 2024-07-27 05:49:41

它位于编辑器 -> 下。 看不见的东西。 您可以选中它来显示它们,或者取消选中它来隐藏它们。


关于 macOS 的说明 

在 mac 环境中,您可以在帮助菜单下搜索任意菜单选项,然后它将打开您要查找的确切菜单路径。 例如,搜索 invisibles 会产生以下结果:

演示

It is under Editor -> Invisibles. You can check it to show or uncheck it to hide them.


A note about the macOS 

In the mac environment, you can search for any menu option under the Help menu, then it will open the exact menu path you are looking for. For example, searching for invisibles results in this:

Demo

谢绝鈎搭 2024-07-27 05:49:41

在 Xcode 6.x 及更早版本中:

查看 -> 文字-> 显示空间

视图 -> 文字-> 显示控制字符

In Xcode 6.x and earlier:

View -> Text -> Show Spaces

View -> Text -> Show Control Characters

假装爱人 2024-07-27 05:49:41

您还可以在搜索字段中输入空格,这会暂时以黄色突出显示所有空格。 我在这里偶然发现了这一点,Marty 反过来问: 这些黄色是什么Xcode 中的间隔符?

You can also enter a white space into the search field, this will highlight all white spaces in yellow temporarily. I found this accidentally here, where Marty asked the other way around: What are these yellow spacers in Xcode?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文