2011-10-17 21:15:03 +00:00
|
|
|
## Synopsis
|
|
|
|
|
|
|
|
This is a [Sublime Text 2](http://www.sublimetext.com/2) plugin.
|
|
|
|
|
2012-10-04 21:29:19 +00:00
|
|
|
**Highlight whitespaces in documents**
|
2011-10-17 21:15:03 +00:00
|
|
|
|
2012-10-04 21:29:19 +00:00
|
|
|
This plugin will highlight each tab or more-than-one space in the document.
|
2011-10-17 21:15:03 +00:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
Go to your `Packages` subdirectory under ST2's data directory:
|
|
|
|
|
2011-10-17 21:16:43 +00:00
|
|
|
* Windows: `%APPDATA%\Sublime Text 2`
|
2012-07-13 09:34:38 +00:00
|
|
|
* OS X: `~/Library/Application Support/Sublime Text 2/Packages`
|
2011-10-17 21:16:43 +00:00
|
|
|
* Linux: `~/.config/sublime-text-2`
|
|
|
|
* Portable Installation: `Sublime Text 2/Data`
|
2011-10-17 21:15:03 +00:00
|
|
|
|
|
|
|
Then clone this repository:
|
|
|
|
|
2012-10-04 21:29:19 +00:00
|
|
|
```git clone git://github.com/disq/HighlightWhitespaces.git```
|
2011-10-17 21:15:03 +00:00
|
|
|
|
|
|
|
That's it!
|
|
|
|
|
|
|
|
## Options
|
|
|
|
|
|
|
|
Several options are available to customize the plugin look 'n feel. The
|
|
|
|
config keys goes into config files accessible throught the "Preferences"
|
|
|
|
menu.
|
|
|
|
|
2012-10-04 21:29:19 +00:00
|
|
|
### Toggle highlight shortcut
|
2011-10-17 21:15:03 +00:00
|
|
|
|
2012-10-04 21:29:19 +00:00
|
|
|
The default toggle highlight shortcut is ```ctrl+alt+w``` (```cmd+alt+w``` for OS X)
|
2011-10-17 21:15:03 +00:00
|
|
|
|
|
|
|
### Change the highlighting color
|
|
|
|
|
|
|
|
One may also change the highlighting color, providing a scope name such
|
|
|
|
as "invalid", "comment"... in "File Settings - User":
|
|
|
|
|
2012-10-04 21:29:19 +00:00
|
|
|
```
|
|
|
|
{
|
|
|
|
"highlight_whitespaces_space_highlight_scope_name": "invalid",
|
|
|
|
"highlight_whitespaces_tab_highlight_scope_name": "invalid"
|
|
|
|
}
|
2011-10-17 21:15:03 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
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
|
2011-10-17 21:35:28 +00:00
|
|
|
1M chars. This is configurable (in "File Settings - User"); unit is number of chars:
|
2011-10-17 21:15:03 +00:00
|
|
|
|
|
|
|
```
|
2012-10-04 21:29:19 +00:00
|
|
|
{ "highlight_whitespaces_file_max_size": 1000}
|
|
|
|
```
|