Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Highlight whitespaces in code. Separate colors for tabs and spaces.
branch: master

This branch is 22 commits ahead, 62 commits behind SublimeText:master

Merge pull request #10 from jackmaney/master

Added `highlight_whitespaces_enabled` summary to README
latest commit 42b9b62842
Kemal authored
Failed to load latest commit information.
Default (Linux).sublime-keymap
Default (OSX).sublime-keymap add keymaps
Default (Windows).sublime-keymap
Default.sublime-commands modify sublime-commands
MIT-LICENSE First commit.
Main.sublime-menu Add package settings menu and option to Edit menu (close #3) Added `highlight_whitespaces_enabled` summary to README Restored option to allow highlight on single space, but set as false …
highlight_whitespaces.sublime-settings Update commented file settings in .py head


This is a plugin for Sublime Text 2 and 3.

Highlight whitespaces in documents

This plugin will highlight each tab or more-than-one space in the document.


Go to your Packages subdirectory under ST2's data directory:

  • Windows: %APPDATA%\Sublime Text 2
  • OS X: ~/Library/Application Support/Sublime Text 2/Packages
  • Linux: ~/.config/sublime-text-2
  • Portable Installation: Sublime Text 2/Data

Then clone this repository:

git clone git://

That's it!

Note for ST3 users: For Sublime Text 3, replace "2" with "3" in path names. (%APPDATA%\Sublime Text 3 and so on)


Several options are available to customize the plugin look 'n feel. The config keys goes into config files accessible throught the "Preferences" menu.

Toggle highlight shortcut

The default toggle highlight shortcut is ctrl+alt+w (cmd+alt+w for OS X)

Disable highlighting when Sublime Text starts up

Change highlight_whitespaces_enabled from the default of true to false.

Change the highlighting color

One may also change the highlighting color, providing a scope name such as "invalid", "comment"... in "File Settings - User":

    "highlight_whitespaces_space_highlight_scope_name": "invalid",
    "highlight_whitespaces_tab_highlight_scope_name": "invalid"

Actually, "invalid" is the default value. If you'd like to use a custom color, it should be defined as a color scope in your theme file. Feel free to ask me how to do it.

Disabling highlighting for large files

Highlighting may be disabled for large files. The default threshold is around 1M chars. This is configurable (in "File Settings - User"); unit is number of chars:

{ "highlight_whitespaces_file_max_size": 1000}


This is a modified version of the TrailingSpaces plugin by Jean-Denis Vauguet and Oktay Acikalin

TrailingSpaces is at

Something went wrong with that request. Please try again.