Yes. I tried to read you text but I could not. Write in one simple question what you want to. Follow this templete, it may help you:
.tmTheme files - change selection background
Please just answer the only questioned asked!
How do we change selection background color?
The additional data describes coding environment in which data changes occur.
Found this on your language theme file:
<dict>
<key>settings</key>
<dict>
<key>background</key>
<string>#FFFFFF</string>
<key>guide</key>
<string>#8c8c8c</string>
<key>stackGuide</key>
<string>#8c8c8c</string>
<key>activeGuide</key>
<string>#FF0000</string>
<key>caret</key>
<string>#000000</string>
<key>foreground</key>
<string>#000000</string>
<key>invisibles</key>
<string>#B3B3B3</string>
<key>lineHighlight</key>
<string>#DADAFF</string>
<key>selection</key>
<string>#B9B9B9</string>
</dict>
</dict>
There you see the line lineHighlight
, what comes next is the color DADAFF
. More info see this other answer: changing-text-color-for-plain-text-syntax
Your example and link are no help. Keyword <background> is color for entire page background. Answer the question, please . What is the keyword to change selection background.
You want the selection
key, the following will set the selection background to red:
<key>selection</key>
<string>#FF0000</string>
There are two other related keys:
<key>selection</key>
<string>#75715e</string>
<key>selectionBorder</key>
<string>#75715e</string>
<key>selectionForeground</key>
<string>#272822</string>
There is documention here on color schemes. The docs say selectionBackground
colors the selection regions, it doesn’t, selection
does, selectionBackground
doesn’t do anything.
Then that’s a different issue entirely, but do try selectionBackground
just I case I’m wrong about it doing nothing (I’m not).
It could be any number of issues, probably a caching issue.
But that’s the right key to change the selection background.
Are you sure? Look at this:
There are some packages which freezes you theme file (sadly true), so any changes will not take effect. Also, be sure you are modifying the right file and you saved your changes.
Caching issue…
Just to clarify, I am using Sublime Text 3, Stable Channel, Build 3126.
ST3 removes ST2 easy access to theme file editing, so packagecontrol.io PackageResourceViewer.
- Solarized (Dark).tmTheme is extracted
- extracted file is edited
- selectionBackground keyword is not working.
-
selection keyword is not working
machine is MacPro 2016 (SIP-enabled hardware)
If you’re using something like Sublime Linter, then it may be creating a custom theme, generated from the original one, with the linter colors added. I think the plugin Color Highlighter does something similar.
Sublime Linter creates a color scheme with the same name suffixed with “(SL)”. You’ll find those in Packages/User/SublimeLinter/*(SL).tmTheme
.
To check what color scheme is currently set look at your preferences.
Preferences shows Solarized (Dark)
Extracted file is at this location on mac:
~Library/Application Support/Sublime Text 3/Packages/Color Scheme - Default/Solarized (Dark).tmTheme
Extracted file is correctly implementing <selectionBorder> border in workspace. That is, selection border can be edited and updates okay. But gerry and addons_zz are confusing this thread:
gerry says use keyword selectionBackground
addons_zz says use keyword selection.
Yes you did! And your link info backs that up.
http://docs.sublimetext.info/en/latest/reference/color_schemes.html#selection
Something is blocking the correct use of keywords?
Something is blocking edit of selection background color.
Right, so this question remains unanswered. For now do we assume, cache issue.
REQUEST: get keywords <selection> and <selectionBackground> working in Sublime Text 3 Build 3126.
Thanks!
This below is on Sublime Text x86 - Build 3126 - Windows 10. It not that what you want to?
You may get the settiings used to record the animated git here: https://github.com/evandrocoan/SublimeTextStudio#installation
After it, edit the file Packages\SublimeNotepadPlusPlusTheme\DefaultStylersTheme.tmTheme
on Sublime Text. You will get exactly the same image as the animation.
If it is cache issue, you need to find what package is caching it, and delete that cache or disable/remove the package while editing the language theme file.
Here is a better Forum thread to follow as the ‘packages’ mystery unravels.
CSS Color Formatting Not Working
I think multiple background customizations were happening, dumping into OS X system caches somewhere. ST3 Customizations in Library kept flagging nothing. Long and short of it, ST3 is a play with software venue, for me. ST3 beta for ages now. Time to give it a rest.
Went back to ST2 and no further issues. Time now to explore what makes Sublime… SUBLIME!