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
File
/Save As ...
Save with Encoding...
(press the arrow next to theSave
button to see this option)- Choose appropriate EOL character from the
Line endings
drop-down list
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.
精彩评论