Hey guys I took the advice given here and split up the whitespace sections a bit: github.com/ckovey/sublime-whitespace-coloring
Changing the regex lets me hide whitespace before the code (I like the sublime bars mostly) and make your trailing whitespace red or some color. In my test screenshot I made the first whitespace blue, in-between text whitespace green, and trailing red. Should work for tabs and spaces
<dict>
<key>match</key>
<string>^\s\t]+</string>
<key>name</key>
<string>meta.whitespace.leading</string>
</dict>
<dict>
<key>match</key>
<string>\s\t]+$</string>
<key>name</key>
<string>meta.whitespace.trailing</string>
</dict>
<dict>
<key>match</key>
<string>\s\t]+</string>
<key>name</key>
<string>meta.whitespace</string>
</dict>
<dict>
<key>scope</key>
<string>meta.whitespace.leading</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#75715E00</string>
</dict>
</dict>
<dict>
<key>scope</key>
<string>meta.whitespace.trailing</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#FF0000</string>
</dict>
</dict>
<dict>
<key>scope</key>
<string>meta.whitespace</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#75715E75</string>
</dict>
</dict>
There’s something in the ruby lang file that makes the whitespace after do
red, but I haven’t looked into that. I mostly wanted to hide leading whitespace and color trailing whitespace