views:

4778

answers:

3

Is there a way to always have LF line endings in Visual Studio? I can never seem to find it!

+2  A: 

Hope this article will help you:

How To Save a File from Visual C++ in UNIX Format

Unfortunately it seems to be the only way to save files in Unix format by default.

Personally I use Advance Save option in Save File dialog. But to be hones I never have a need to work with large number of files in Unix format from MSVS.

aku
A: 

Visual Studio 2008 doesn't retain the advanced save options after the solution is closed. I would be willing to hand edit a lot of files if that would make it work consistently, but I am not willing to change all of the settings every time I open VS.

This is too bad. Since VS does support forcing the line-endings to whatever is desired in the backend, its just not hooked up properly in the UI. Maybe Microsoft will fix this isn a service pack.

+3  A: 

There'a an add-in for Visual Studio 2008 that converts the end of line format when a file is saved. You can download it here: http://grebulon.com/software/stripem.php

IMHO, this should be the chosen answer to this posted.
ShaChris23