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.
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.
You can also choose to convert only files with names that match a given regular expression.
Download
You can download the Add-in and the source code separately:
- Add-in only – installer for VS 2015 (thanks to Dessix), Source code
- Add-in only – installer for VS 2013 (thanks to Turing Eret), Source code
- Add-in only – installer for VS 2012 (and 2010), Source code
- Add-in only – installer for VS 2008, installer for VS 2010 (older version), Source code
- Add-in only – for VS 6, Source code
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.