如何显示PhpStorm中的隐藏字符,特别是行分隔符 [英] How to display hidden characters in PhpStorm, especially line seperators
问题描述
我的代码中有一些特殊字符,请看看:
a
它只是显示在正常字符如a的前端。
现在没有任何正常字符的相同字符:
字符从这里开始
字符在这里结束
好吧,看起来这个编辑器不会保存空白,请尝试使用代码段。
< html>< p> < / html>
,在PhpStorm中这个字符不会被显示出来,即使不与
settings - Editor - General - Appearance - 显示空格或者
设置 - 编辑器 - 常规 - 外观 - 显示方法分隔符
只有strg + f,strg + r p>
我认为这个字符是only-mac-char:)我正在使用Windows,并且我无法在mac上进行测试。
编辑:对不起,我可以将其识别为U + 2028:LINE SEPARATOR
http://www.babelstone.co.uk/Unicode/whatisit.html
最大的问题是phpStorm没有在代码中显示任何内容。就像没有字符一样,但用箭头键在这个位置注意到2个步骤,2个标签之间看起来像><但它是><。
根据您的更新,现在清楚您想要的字符: p>
抱歉,我可以将其识别为U + 2028:LINE SEPARATOR http://www.babelstone.co.uk/Unicode/whatisit.html
安装并使用零宽度字符定位器插件 - 它可以检测到很少的不可见字符(例如UTF-8 BOOM序列,非易碎空间,Unicode行分隔符(<它是以最高(错误)严重程度的单独检查形式实现的,因此将很容易找到或检查整个文件夹/文件夹,项目只是为了解决这些问题。
有一张票(功能请求)可以在编辑器中显示不可见字符。
https://youtrack.jetbrains.com/issue/IDEA-115572 - 观看此票(明星/投票/评论)以获得任何进展的通知。
其他相关门票:
I got some special characters in my codes, take a look at:
a
It's just shown in frontend with normal characters like an "a". Now the same characters without any normal characters:
Characters starts here
Characters ends here
Ok it looks like this Editor will not save empty , try it with snippet.
<html><p>
</p></html>
The problem is, in PhpStorm this characters wont be shown, even not with
"settings - Editor - General - Appearance - show whitespaces" or
"settings - Editor - General - Appearance - show method separators"
Only "strg+f, strg+r" will find this characters.
I think this character is an "only-mac-char" :) I'm working with Windows, and I can't test it on mac.
EDIT: Sorry i could identify it as "U+2028 : LINE SEPARATOR" http://www.babelstone.co.uk/Unicode/whatisit.html
The big problem is that phpStorm didn't show anything in the code. Like there is no character, but moving with the arrow keys notice 2 steps at this position, between 2 tags looks like "><" but it's "> <".
Based on your update it is now clear what character you have in mind:
Sorry I could identify it as "U+2028 : LINE SEPARATOR" http://www.babelstone.co.uk/Unicode/whatisit.html
Install and use Zero Width Characters locator plugin-- it can detect quite few invisible characters (e.g. UTF-8 BOOM sequence, non-breakable space, Unicode line separator (your case) etc).
It is implemented as separate inspection with highest (Error) severity so will be easy to spot or check whole folder/project just for these issues.
There is a ticket (Feature Request) to have an option to show invisible characters in editor.
https://youtrack.jetbrains.com/issue/IDEA-115572 -- watch this ticket (star/vote/comment) to get notified on any progress.
Other related tickets:
- https://youtrack.jetbrains.com/issue/IDEA-99899 (your case, as I understand)
- https://youtrack.jetbrains.com/issue/IDEA-140567
- https://youtrack.jetbrains.com/issue/WEB-13506
这篇关于如何显示PhpStorm中的隐藏字符,特别是行分隔符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!