有时,我(发行中)找到了这个角色。那么,如何在Visual Studio Code中突出显示它呢?ps我知道没有BOM的utf-8,但是要解决它,我需要在notepad ++中打开带有代码的页面并更改编码。而且我想在Visual Studio Code中看到此unicode如何突出显示,所以我可以看到(并在以后删除)
工作原理
1)我添加了扩展名Gremlins
2)并在C:\ Users \ tomnolane.vscode \ extensions \ nhoizey.gremlins-0.6.2 \ extension.js中添加了以下代码:
const gremlins = [
{
...
},
{
char: 'feff',
regex: /\ufeff+/g,
width: 0,
message: 'Zero Width No-Break Space',
backgroundColor: 'rgba(255,127,80,.5)',
overviewRulerColor: 'rgba(255,127,80,1)',
},
{
char: '2060',
regex: /\u2060+/g,
width: 0,
message: 'Word Joiner',
backgroundColor: 'rgba(255,127,80,.5)',
overviewRulerColor: 'rgba(255,127,80,1)',
},
{
char: 'fffe',
regex: /\ufffe+/g,
width: 0,
message: 'Not a Character',
backgroundColor: 'rgba(255,127,80,.5)',
overviewRulerColor: 'rgba(255,127,80,1)',
},
]
3)然后,重新加载Visual Studio Code即可!
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句