TextMate 可以显示制表符与空格字符吗?
在Mac上使用TextMate,可以通过使用显示“不可见”
View -> Show Invisibles
但不显示空格与制表符字符,并且“首选项”似乎也没有任何条目可以更改它。有办法向他们展示吗?这是因为一些较旧的编码器可能将制表符或空格混合在一起,因此在编辑器中看起来不错的内容实际上可能是未对齐的。 (编辑器将制表符显示为 2 个空格)
Using TextMate on Mac, the "invisibles" can be displayed by using
View -> Show Invisibles
But the space vs tab characters are not shown, and Preferences doesn't seem to have any entry to change that either. Is there a way to show them? It is because some older coder may have tab or space mixed together so what looks good in the editor may actually be misaligned. (editor shows tab as 2 spaces)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
显示制表符,但不显示空格。可能发生的情况是您打开了软选项卡,在这种情况下,选项卡会自动转换为空格。
替代文本 http://grab.by/grabs/fabaea391dc8bc764636f0ca19a8c38d.png
在这张图片中有一个制表符、换行符、制表符、换行符、软制表符、换行符
请参阅 此线程解释为什么不显示空格。
您可以在此处更改软/真实选项卡。
替代文本 http://grab.by/grabs/783db3a88609a01c7702cbd250f495c6.png
Tab characters are shown, but spaces are not. What's probably happening is that you have Soft tabs turned on, in which case the tabs are converted into spaces automatically.
alt text http://grab.by/grabs/fabaea391dc8bc764636f0ca19a8c38d.png
In this picture there is a tab character, new line, tab character, new line, soft tab, new line
See this thread for an explanation as to why spaces are not shown.
Here is where you can change soft/real tabs.
alt text http://grab.by/grabs/783db3a88609a01c7702cbd250f495c6.png
如果激活“显示不可见”,您将看到每个选项卡都有一个指向右侧的小三角形。空格根本不显示,您只能间接看到它们,即通过代表换行符的符号。如果换行符不是该行代码之后的第一个字符,则换行符之间有空格。
因此,长话短说:您应该已经看到了选项卡,但是代表不可见内容的符号有时很难看到。
If "Show invisibles" is activated, you will see a little triangle for each tab, which points to the right. Spaces are not shown at all, you can only see them indirectly, i.e. via the symbol which represents the line break. If the line break isn't the first character after your code of that line, there are spaces in between.
So to make a long answer short: You should already see tabs, however the symbols representing the invisibles are sometimes hard to see.