如何默认显示隐藏字符(ZERO WIDTH SPACE即。&#8203) [英] How to display hidden characters by default (ZERO WIDTH SPACE ie. &#8203)

查看:1920
本文介绍了如何默认显示隐藏字符(ZERO WIDTH SPACE即。&#8203)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于这个原因,我只是失去了周末的一部分......小丑 - 零宽度空间。我刚刚使用了google网上的一些片段并且没有认识到有双倍的字符,因为Idea(11)没有显示它们,这导致解析我的应用程序的配置文件的问题...我在vi中意外地发现了它。

I just lost part of my weekend because of this ... joker - zero width space. I just used some snippets from google groups and didn't recognize that there are doubled characters, because Idea (11) didn't show them, which was causing problems with parsing config file of my app... I discovered it accidentally in vi.

有没有办法在不使用外部编辑器的情况下以IntelliJ(或其他方式检查文件)显示这些内容。

Is there any way to display such things in IntelliJ (or some other way to examine files) without using external editors.

IntelliJ 11 / Mac OS 10.7

IntelliJ 11 / Mac OS 10.7

编辑 - 样本

这两行看起来完全相同,在浏览器和Idea中。您可以在页面的代码中看到,在第一个注释行中, mysql:// localhost ,这会导致问题。当然,如果您期望小丑,您可以尝试使用搜索并替换它,但是没有人会期望不应该存在的标志,特别是如果他无法以任何方式看到它。

These two lines looks identical, in browser and also in Idea. You can see in page's code that in first - commented line there is hidden zero width space between mysql:// and localhost, which causes problems. Of course if you expect that 'joker', you can try to use search and replace it, however nobody expects the sign that should not be there, especially if he cannot see it in any way.

#db.default.url="jdbc:mysql://​localhost/play-fullcalendar"
 db.default.url="jdbc:mysql://localhost/play-fullcalendar"


推荐答案

不确定您的意思,但您可以在设置 - >中永久打开和关闭显示空格。编辑 - >一般 - >外观 - >显示空格

Not sure what you meant, but you can permanently turn showing whitespaces on and off in Settings -> Editor -> General -> Appearance -> Show whitespaces.

此外,您只能在视图 - >中为当前文件设置它。活动编辑器 - >显示WhiteSpaces

编辑:

有一些空闲时间,因为它看起来像一个流行的问题,我写了一个插件来检查这些异常的代码。它被称为零宽度字符定位器,欢迎您试一试

Had some free time since it looks like a popular issue, I had written a plugin to inspect the code for such abnormalities. It is called Zero Width Characters locator and you're welcome to give it a try.

这篇关于如何默认显示隐藏字符(ZERO WIDTH SPACE即。&#8203)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆