'Cannot disable VSCode to remove ending whitespace on save?
I have realized a behaviour of VSCode that causing conflict on committing files in an Angular project. When saving a file (*.ts), VSCode removes the ending whitespaces automatically and I have not managed to disable it by using lots of settings changes etc. as shown below. So, how can I disable it? And I do not want to open format on save feature as well.
settings.json:
"[markdown]": {
"files.trimTrailingWhitespace": false
}
"editor.trimAutoWhitespace": false,
or using UI: File → Preference → Settings → Search and uncheck Trim Trailing Whitespace option.
But it still the same behaviour. ANy idea to fix it? I have installed Prettier also.
"files.trimTrailingWhitespace": true
Solution 1:[1]
After disabling and deselecting as many extensions & settings as concerned the issue of visual studio code removing my spaces, but with no positive results, I found out that the issue was with this one simple move, Auto Save deselecting that is what worked for me. (Files -> Auto Save)
Solution 2:[2]
I resolved this annoying behavior by removing the latest installed extensions in VS code.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Lord Luke |
| Solution 2 | Viktor Fursov |
