What does Visual Studio mean by normalize inconsistent line endings?

后端 未结 11 2050
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 19:51

Visual Studio occasionally tells me:

The line endings in the following files are not consistent. Do you want to normalize the line endings?

11条回答
  •  一个人的身影
    2020-11-30 20:06

    It means that, for example, some of your lines of text with a (the Windows standard), and some end with just a (the Unix standard).

    If you click 'yes' these the end-of-lines in your source file will be converted to have all the same format.

    This won't make any difference to the compiler (because end-of-lines count as mere whitespace), but it might make some difference to other tools (e.g. the 'diff' on your version control system).

提交回复
热议问题