This extension will highlight and remove any trailing whitespace on any line in any editor in Visual Studio.
Download and install the extension from the Visual Studio Gallery or get the nightly build.
You can very easily delete all the trailing whitespace in a file by executing the Delete Horizontal White Space command found in Edit -> Advanced or by using the shortcut key combination Ctrl+K, Ctrl+\
You can change the background color from the Tools -> Options dialog under the Environment -> Fonts and Colors settings.
The setting is for the Text Editor and the display item is called Trailing Whitespace.
It's easy to add specify what file patterns to ignore. Any ignored file will have whitespace colorized or removed on save.
By default, file paths with any of the following strings contained in it will be ignored:
- \node_modules\
- \bower_components\
- \typings\
- \lib\
- .min.
- .md
- .markdown
You can modify these rules in the Tools -> Options dialog.
Every time a file is saved, all trailing whitespace is removed. This can be disabled in the Tools -> Options dialog.
Check out the contribution guidelines if you want to contribute to this project.
For cloning and building this project yourself, make sure to install the Extensibility Tools 2015 extension for Visual Studio which enables some features used by this project.