默认情况下如何显示隐藏字符(零宽度空间即&#8203) [英] How to display hidden characters by default (ZERO WIDTH SPACE ie. &#8203)

查看:40
本文介绍了默认情况下如何显示隐藏字符(零宽度空间即&#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"

推荐答案

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

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

此外,您只能在 View -> 中为当前文件设置它.活动编辑器 ->显示空格.

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

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.

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

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