Visual Studio通过标准化不一致的行尾是什么意思? [英] What does Visual Studio mean by normalize inconsistent line endings?

查看:1018
本文介绍了Visual Studio通过标准化不一致的行尾是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio偶尔会告诉我:

Visual Studio occasionally tells me:

以下文件中的行尾不一致.您要归一化行尾吗?

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

然后,它为我提供了使用不同标准或类似标准的下拉菜单,例如Windows,Mac,Unix和一些Unicode标准.

It then gives me a drop down with different standards or something, such as Windows, Mac, Unix, and a couple of Unicode ones.

这是什么意思,如果我单击Yes,会发生什么?

What does this mean and what is going to happen if I click Yes?

推荐答案

通常意味着您的行以回车/换行对以外的其他结尾.当您从网页复制并将其粘贴到代码编辑器中时,通常会发生这种情况.

What that usually means is that you have lines ending with something other than a carriage return/line feed pair. It often happens when you copy and paste from a web page into the code editor.

标准化行尾只是确保所有行尾字符都一致.它可以防止一行以\r\n结尾,另一行以\r\n结尾;第一个是Windows线端对,而其他通常用于Mac或Linux文件.

Normalizing the line endings is just making sure that all of the line ending characters are consistent. It prevents one line from ending in \r\n and another ending with \r or \n; the first is the Windows line end pair, while the others are typically used for Mac or Linux files.

由于您正在Visual Studio中进行开发,因此显然您会希望从下拉列表中选择"Windows". :-)

Since you're developing in Visual Studio, you'll obviously want to choose "Windows" from the drop down. :-)

这篇关于Visual Studio通过标准化不一致的行尾是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆