VisualStudio修改文本文件的line ending

 

 

官方文档:

https://msdn.microsoft.com/en-us/library/dd409797.aspx

 

In Visual Studio you can use the File/Advanced Save Options settings to determine the type of line break characters you want. You can also change the encoding of a file with the same settings.

System_CAPS_noteNote

If you have certain types of development settings (Visual Basic, F#, Web Development) you may not see Advanced Save Options on the menu. To change your settings (for example to General), open Tools / Import and Export Settings. For more information, see Customizing Development Settings in Visual Studio.

In Visual Studio the following characters are interpreted as line breaks:

  • CRLF: Carriage return + line feed, Unicode characters 000D + 000A

  • LF: Line feed, Unicode character 000A

  • NEL: Next line, Unicode character 0085

  • LS: Line separator, Unicode character 2028

  • PS: Paragraph separator, Unicode character 2029

Text that is copied from other applications keeps the original encoding and line break characters. For example, when you copy text from Notepad and paste it into a text file in Visual Studio, the text has the same settings that it had in Notepad.

When you open a file that has a different line break characters, you may see a dialog box that asks whether the inconsistent line break characters should be normalized and which type of line breaks to choose.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值