Visual Studio Code – 通过按下CTRL+S保存时删除代码行

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

Visual Studio Code - Deletes lines of code upon saving via CTRL+S

问题

我一直在使用VSCode时遇到一个持续的问题,非常令人沮丧。我在编写Go语言代码时,有时按下CTRL+S会删除整行,或者只是随机的数字。我还没有能够找到其中的规律,它并不总是发生,但这个问题变得越来越令人讨厌。

我尝试过以下方法来解决这个问题:

  • 重新安装VSCode
  • 重新安装Go
  • 禁用保存时的自动格式化,以及所有类型的自动格式化

我还没有找到其他遇到这个问题的人来咨询。谢谢你的阅读,请告诉我如果你能找到这个问题的源头。

VSCode版本:v1.69.2
Go版本:1.19

问题的截图 - CTRL+S之前和之后的对比:

CTRL+S之前

CTRL+S之后

英文:

I've been having an ongoing issue with VSCode that I find very frustrating. I'm coding on GoLang, and whenever I press CTRL+S sometimes it would delete whole lines, or just random digits. I haven't been able to recognize a pattern to it, and it doesn't always happen but it has become an increasingly annoying issue.

Ways I've tried to fix it include:

  • reinstalling VSCode
  • reinstalling Go
  • disabling auto-format on save, as well as every kind of auto format

I also haven't been able to find anyone else with this issue to consult with them. Thank you for reading and please let me know if you could find the source of this problem.

VSCode: v1.69.2
Go version: 1.19

A Screenshot of the issue - before vs after ctrl+s

before CTRL+S

after CTRL+S

答案1

得分: 1

卸载了所有未使用的扩展程序,自那时以来就没有遇到这个问题了。

英文:

Uninstalled all unused extensions and haven't encountered the issue since then

huangapple
  • 本文由 发表于 2022年8月8日 17:47:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/73275904.html
匿名

发表评论

匿名网友

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

确定