HighlightWhitespaces/README.md

64 lines
1.7 KiB
Markdown
Raw Normal View History

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`
* 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}
```
2012-10-04 21:36:42 +00:00
### Credits
This is a modified version of the TrailingSpaces plugin by Jean-Denis Vauguet and Oktay Acikalin
2012-10-04 21:37:19 +00:00
2012-10-04 21:36:42 +00:00
TrailingSpaces is at https://github.com/SublimeText/TrailingSpaces/