Strip’em Add-in for Visual Studio

This Add-in converts the text format of a file when it is saved in Visual Studio.
This can be very useful when working in a mixed Windows-Unix environment. In Unix, end of lines in text files are identified by line feed characters. In Windows – they are identified by a combination of carriage return and line feed. This add-in makes sure that files will be saved the way you want.
It support end-of-line (EOL) convertion to Unix, Windows or old Mac conventions.

Download

Open the add-in’s configuration dialog by selecting Tools | Strip’em from the menu.
There’s also a Strip’em button on the standard toolbar.

stripem 2012 menu
You can select the EOL convention or completely disable the conversion from the dialog.
You can also choose to convert only files with names that match a given regular expression.

stripem 2012 dialog

Download

You can download the Add-in and the source code separately:

Setup

Just run the installer. If Visual Studio is open, you need to close and open it to load the add-in.

The installer copies the add-in’s files into Documents and Settings\All Users\Application Data\Microsoft\MSEnvShared\Addins.

To configure the EOL mode, open Visual Studio and select: Tools | Strip’em

Possible problems

Strip’em catches file save events and converts the EOLs in the file.
You need to configure Visual Studio to automatically reload files that
change externally.

Select Tools | Options… | Environment | Documents from the menu. Check
“Detect when file is changed outside the environment” and “Auto-load
changes, if saved”.

History

Jan 24, 2011
Add an installer for Visual Studio 2010.
The source code is the same except for one small change: in stripem.AddIn,
changed the value of the <version> tags to 10.0. Thank to Dimitar Dobrev
for helping me sort this out.

Jan 21, 2010
Two fixes for convertion to Unix format:
1. Correctly convert DOS paragraphs, which are secuences of CR followed by LF.
2. Always make sure Unix files end with LF.

Aug 9, 2009
First release.

Freeware

This software is free. It is distributed with the source code and you are encouraged to do anything you want with it. If you do anything interesting, I’d be happy to hear about it.