开发者

Change EOL Character in Visual Studio

I’m sorry if t开发者_Go百科his is a trivial question for you.

Is there any way to change the End of Line Character (EOL) character in Visual Studio 2010? I want to change it from Windows (‘\r\n’) format to UNIX (‘\n’) format.

Thanks


  1. File / Save As ...
  2. Save with Encoding... (press the arrow next to the Save button to see this option)
  3. Choose appropriate EOL character from the Line endings drop-down list

Change EOL Character in Visual Studio


Click somewhere in the code page. Go to File -> Advanced Save Options -> use the Line Endings Drop box to select the line ending you want on ALL of your output files (when using \n for EOL). This solution is written for Visual Studio 2008.


For doing this globally, Strip'em is an add-in for Visual Studio that will automatically convert the line-ending when saving a file. Works for VS 2008/2010/2012.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜