Skip to content
| Marketplace
Sign in
Visual Studio>Tools>Trailing Whitespace Visualizer
Trailing Whitespace Visualizer

Trailing Whitespace Visualizer

Mads Kristensen

|
260,036 installs
| (96) | Free
Keeps your code files clean by making it easier than ever to identify and remove any trailing whitespace
Download

This extension will highlight and remove any trailing whitespace on any line in any editor in Visual Studio. This makes it really easy to get rid of those annoying invisible characters.

Trailing Whitespace Visualizer

You can change the background color easily from the Tools -> Options -> Fonts and Colors menu. The item is called "Trailing Whitespace".

Remove trailing whitespace

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+\

Changing the background color

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.

Visual Studio Settings

Ignore rules

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.

Remove on save

Every time a file is saved, all trailing whitespace is removed. This can be disabled in the Tools -> Options dialog.

Options dialog

Contribute

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.

License

Apache 2.0

Changelog

version 2.3 - March 24, 2016

  • Added option to ignore misc files
  • Added short delay to visualizations

version 2.1 - December 15, 2015

  • More granular ignore patterns
  • Ignore autu-generated files

version 2.0 - April 18, 2015

  • Trim whitespace on save
  • Added Tools | Options
  • No colorizing on current line

version 1.10 - January 15, 2015

  • Fixed Razor/WebForms issue
  • Better whitespace removal logic
  • Takes over the older Delete Horizontal White Space command completely
  • Simplified the source code

version 1.8 - December 12, 2014

  • Fixed a null reference exception
  • Major refactoring

version 1.7 - December 2, 2014

  • Added command to remove trailing whitespace

version 1.6 - November 29, 2014

  • Fixed logo/preview image dimensions
  • Code cleanup

version 1.5 - September 3, 2014

  • Added support for Visual Studio 14

version 1.4

  • Added checks for whitespace on empty lines
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft