我面临一个令人烦恼的问题,尽管明确设置了应该完成的操作,但没有为HTML和JavaScript保存新行。有人可以指导我做错了什么吗?
GitHub Project
Visual Studio Code版本详细信息:
Version 1.23.0
Commit 7c7da59c2333a1306c41e6e7b68d7f0caa7b3d45
Date 2018-05-03T15:23:19.356Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
VS代码设置:
最佳答案
这是因为🆚CODE中的默认设置
// When enabled, insert a final new line at the end of the file when saving it.
"files.insertFinalNewline": false,
将其设为true,您将可以保留新的一行。我还建议您打开微调器,最后再插入多行。
“files.insertFinalNewline”:是的,
“files.trimFinalNewlines”:true,
⚡ Here's a GIF Demo — Save a file to add a line or trim extra lines
关于visual-studio-code - VS代码: End of file new line not persisting,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50162952/