简体   繁体   English

Visual Studio Code 不显示不可见字符/空格

[英]Visual Studio Code Not Displaying Invisible Characters/Spaces

I am currently working on writing code for a Source Game Engine map file.我目前正在为源游戏引擎地图文件编写代码。 I have issues with Visual Studio Code not displaying certain invisible characters.我遇到 Visual Studio Code 不显示某些不可见字符的问题。

When using notepad++, I can see there are invisible characters in between the lines:使用记事本++时,我可以看到行之间有不可见的字符: 使用记事本++时,我可以看到行之间有不可见的字符

But when I open it up in visual studio code, it's as if the invisible character doesn't exist.但是当我在 Visual Studio 代码中打开它时,就好像不可见的角色不存在一样。

This is what I see when using visual studio code:这是我在使用 Visual Studio 代码时看到的: 这是我在使用 Visual Studio 代码时看到的

I have asked my friends who also do the same thing (making Source Engine Maps) and they all don't have this issue.我问过我的朋友,他们也做同样的事情(制作 Source Engine Maps),他们都没有这个问题。 One of my friends sent me this image:我的一个朋友给我发了这张图:

This is what he sees in his own editor, with squares representing the invisible character/space:这是他在自己的编辑器中看到的,方块代表不可见的字符/空间: 这是他在自己的编辑器中看到的,方块代表不可见的字符/空间

I've done a few things to try to fix this issue:我做了一些事情来尝试解决这个问题:

  • Changing fonts (I used a custom font but reset to default to see if it had any impact)更改字体(我使用了自定义字体,但重置为默认字体以查看是否有任何影响)
  • Changing encoding setting (UTF-8 was what my friends used but I tried tinkering around)更改编码设置(UTF-8 是我朋友使用的,但我尝试修改)
  • Changing editors (Tried Atom/Sublime but only Notepad++ even shows there being an invisible character)更改编辑器(尝试过 Atom/Sublime 但只有 Notepad++ 甚至显示有一个隐形字符)
  • Updated / reinstalled language packs更新/重新安装语言包
  • Enabling whitespaces启用空格

After everything, I still have the same issue.毕竟,我仍然有同样的问题。 Are there other possible fixes/causes for this issue?此问题是否有其他可能的修复/原因?

Fixed固定的
I just had to enable Render Control Characters in visual studio code.我只需要在 Visual Studio 代码中启用Render Control Characters

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM