I want the tabs and spaces to be visible in Xcode. Is this possible? I can't find it under preferences.
我希望标签和空格在Xcode中可见。这可能吗?我根据喜好找不到它。
5 个解决方案
#1
In Xcode 6.x and earlier:
在Xcode 6.x及更早版本中:
View -> Text -> Show Spaces
查看 - >文本 - >显示空间
View -> Text -> Show Control Characters
查看 - >文本 - >显示控制字符
#2
Editor -> Show Invisibles in Xcode 4
编辑器 - >在Xcode 4中显示Invisibles
#3
You can also use defaults to read/write to the XCode plist
您还可以使用默认值来读取/写入XCode plist
This is used/tested in Xcode 6.1
这在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
#4
In Xcode 7 and later, this command has moved to the Editor menu:
在Xcode 7及更高版本中,此命令已移至编辑器菜单:
Editor > Show Invisibles
编辑>显示隐形
or
Editor > Hide Invisible
编辑>隐藏隐形
#5
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?
您还可以在搜索字段中输入空白区域,这将暂时突出显示黄色的所有空白区域。我在这里意外地发现了这个,Marty在另一边问道:Xcode中的这些黄色垫片是什么?
#1
In Xcode 6.x and earlier:
在Xcode 6.x及更早版本中:
View -> Text -> Show Spaces
查看 - >文本 - >显示空间
View -> Text -> Show Control Characters
查看 - >文本 - >显示控制字符
#2
Editor -> Show Invisibles in Xcode 4
编辑器 - >在Xcode 4中显示Invisibles
#3
You can also use defaults to read/write to the XCode plist
您还可以使用默认值来读取/写入XCode plist
This is used/tested in Xcode 6.1
这在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
#4
In Xcode 7 and later, this command has moved to the Editor menu:
在Xcode 7及更高版本中,此命令已移至编辑器菜单:
Editor > Show Invisibles
编辑>显示隐形
or
Editor > Hide Invisible
编辑>隐藏隐形
#5
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?
您还可以在搜索字段中输入空白区域,这将暂时突出显示黄色的所有空白区域。我在这里意外地发现了这个,Marty在另一边问道:Xcode中的这些黄色垫片是什么?