为什么我的VS Code会对空格字符进行红色高亮,尽管我在那里没有错误?

huangapple go评论130阅读模式
英文:

Why is my VS Code having red highlighing of space characters even though I dont have errors there?

问题

我还在学习,正在使用VS Code,但不知何故,我的IDE更改了颜色,我感到不舒服。我尝试更改主题,但似乎没有效果。

英文:

I'm still learning and I'm using VS Code, but somehow my IDE changed its colors and I'm not comfortable with it. I tried changing themes, but that doesn't seem to have an effect.

为什么我的VS Code会对空格字符进行红色高亮,尽管我在那里没有错误?

答案1

得分: 1

这看起来像是 shardulm94.trailing-spaces 扩展程序。也许你不小心安装了它。它会突出显示行尾的空格字符。你可以配置它在保存时删除行尾的空格(你也可以在你的 settings.json 文件中使用 "files.trimTrailingWhitespace": true 来配置 VS Code 也执行此操作)。

如果你不想要它,可以卸载或禁用该扩展。如果你想配置它的外观,可以在设置中进行设置。

英文:

That looks like the shardulm94.trailing-spaces extension. Maybe you installed it by accident. It's highlighting trailing spaces (space characters at the ends of lines). You can configure it to remove trailing spaces on save. (you can also configure VS Code to do that too with "files.trimTrailingWhitespace": true in your settings.json file).

If you don't want it, uninstall or disable the extension. If you want to configure how it looks, you can do so in the settings.

huangapple
  • 本文由 发表于 2023年3月1日 16:20:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/75601107.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定