【问题标题】:How to stop Visual Studio from putting extra newline at the end of a file on save如何阻止 Visual Studio 在保存时在文件末尾添加额外的换行符
【发布时间】:2020-10-23 14:17:23
【问题描述】:

我正在使用Visual Studio 2019,当我保存文件(例如cs 文件)时,VS 会在文件的末尾添加一个额外的换行符。

  1. 我需要制止这种行为,但到目前为止我在互联网上搜索的内容是关于visual studio codeVisual Studio 以外的编辑。
  2. 在文件末尾添加一个额外的换行符的原理是什么?

【问题讨论】:

标签: visual-studio editor


【解决方案1】:

根据this链接,我需要使Advanced Save Options菜单可见,然后单击它并将line endings下拉值从Current Settings更改为Windows (CR LF)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-05-28
    • 2023-03-16
    • 2014-07-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-01
    • 2010-10-22
    相关资源
    最近更新 更多