The color seems to be linked to the foreground in themes. I assume it's using less alpha. Is there a way to control this?
This happens when Sublime Text doesn't know which syntax highlighting to choose. First of all Sublime Text guesses the syntax from the file extension. E.g. if you have a file named my_file_name. php Sublime Text assumes that the PHP syntax highlighting is the best.
Changing the selection colour in Sublime Text 3. Open the command palette with ⌘+⇧+P on mac iOS (for windows/linux Ctrl + Shif + P) and type prv to get the PackageResourceViewer options. Choose Open Resource >> Color Scheme – Default >> and choose your theme file to edit.
There's now a Sublime plugin for this.
Install the HighlightWhitespaces plugin
Add the following color settings (tailored to your preference) to your color_scheme file. This file ends in .tmTheme
and the path can be found by looking at the value for the key "color_scheme" in your settings file.
<dict>
<key>name</key>
<string>highlight.whitespace</string>
<key>scope</key>
<string>highlight.whitespace</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#020202</string>
<key>foreground</key>
<string>#805050</string>
</dict>
</dict>
Specify that this color should be used by adding the following to the user settings of the HighlightWhitespaces plugin:
{
"highlight_whitespaces_space_highlight_scope_name": "highlight.whitespace",
"highlight_whitespaces_tab_highlight_scope_name": "highlight.whitespace",
"highlight_whitespaces_eol_highlight_scope_name": "highlight.whitespace",
"highlight_whitespaces_mixed_highlight_scope_name": "highlight.whitespace"
}
Relax and enjoy :-)
You may want to try installing PersistentRegexHighlight from Package Control and then use a blank-character regex like [\x20 ]
to add a specific color or color scope.
You'd want to combine this with drawWhiteSpace: "all",
in Sublime user prefs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With