Sublime Forum

Tweak aspects of a theme

#1

When I first got into sublime, I found a theme I liked, copied it, tweaked it and used it for years.

Then I got grumpy that it just wasn’t really working properly, and it just was annoying, and I was about to complain like a little baby, when I decided to switch back to the theme that I had started from, and it exhibited none of the problems I had experienced.

So that made me wary of grabbing themes and modifying them.

Currently I am using this theme:

"color_scheme": "Packages/Colorsublime - Themes/cache/Colorsublime-Themes-master/themes/Wombat.tmTheme",

and I wish the selection were a little more pronounced. And I wish the way it highlighted the line with the cursor was also a little more pronounced.

Is there a way for me to do that w/out copying the theme and then losing the benefit of updates?

0 Likes

#2

https://www.sublimetext.com/docs/3/themes.html#customization

3 Likes

#3

Can’t get it working.

The documentation talks about JSON file formats, but tmTheme files appear to be in plist format (god-awful looking things).

I tried JSON data in there and then I tried a mini plist file that has the structure of the original theme file, with just my property changes.

I’ve placed that file in …/Packages/User/Wombat.tmTheme

Any ideas what I am missing?

0 Likes

#4

Oh my - I am using an older style theme.

JSON is the new format. I need … to get with the program.

Now I just have to find wombat it modern JSON syntax I … think?

0 Likes

#5

The file you need to create always has to be a sublime-color-scheme file, even if the color scheme that you’re augmenting is a tmTheme file.

The video below covers this particular topic, along with how to start creating your own color scheme from scratch (other videos in the series go into more details on this as well). The part of the video that references what you’re trying to do here is at 13:13.

[Edit]
If you want to convert your existing tmTheme color scheme to the new format, that’s also easy as well; see this video).
[/Edit]

1 Like

Turning specific texts into italic
#6

I looked at both your videos. Thanks!

Sadly I am still stumped.

I created Wombat.sublime-color-theme in my Packages/User directory. It looks like this

{
    "globals": {
       "selection": "#555",
       "line_highlight": "#444",
   }
}

Not taking.

I converted the tmTheme file to sublime-color-theme file in a buffer so I could look at it. But I don’t have to save that and start using it, right? Because then I am no longer just augmenting the color scheme.

Any more tips for this poor little bunny?

0 Likes

#7

Have you tried setting those values to something really obviously different, like magenta, just to be sure? I’m not familiar with that theme, but in Monokai those color values are extremely close to the defaults.

If you convert without saving, then you can see what it’s settings things to but it won’t have any effect on anything. So you indeed would need to save it if you want it to apply and be in the new format.

If you save it using the same name as it originally was, it would be considered an augment and things would go all weird (potentially). If you want to do that and just modify it directly, I’d recommend saving the converted version under a different name and then switch your color_scheme preference to use that one instead.

0 Likes

#8

I have a screen color reader that showed me the color didn’t change. Plus I set it to red …

I didn’t save the converted Wombat.tmTheme to a file. I just placed my augmented changes in the place where I said.

Definitely not picking up the changes. I gather you think I had the right format …

Argh - I know it’s possible just not sure what I am doing wrong.

0 Likes

#9

In that case I’m not sure why it wouldn’t be working offhand; if I save the content you mentioned above in a Monokai.sublime-color-scheme file in my User folder, it works as expected (although as mentioned the color change is pretty light). As such, saving it to a Wombat.sublime-color-scheme file should be working for you as well.

You mentioned above that you used to use this theme, then you copied it, then you went back to the original. Is your copy still present somewhere?

0 Likes

#11

I found that I had a really old Colorsublime … or at least I think I did.

So I removed everything related to colorsublime … and then deleted my reference to a theme in my preferences and then I realised that I had to install color themes that I want to use, which failed until I deleted my Wombat.sublime-color-theme file in my User folder …

And then I installed Wombat and it seems to be using that …

And then I added back my Wombat.sublime-color-theme file to my User folder … and …

Nothing.

0 Likes

#12

Here are files in my Sublime hierarchy:

$ find . -name "Wombat*" -print
./Cache/Colorsublime - Themes/Wombat.tmTheme.cache
./Packages/User/Wombat.sublime-color-theme
./Packages/Colorsublime - Themes/cache/Colorsublime-Themes-master/themes/Wombat.tmTheme
./Packages/Colorsublime - Themes/Wombat.tmTheme

Have I named things and put them in the right places?

0 Likes

#13
./Packages/User/Wombat.sublime-color-theme

should be ./Packages/User/Wombat.sublime-color-scheme, no?

1 Like

#14

I don’t know you … but I love you.

Man - THANKS!

0 Likes

#15

:slight_smile: No problem, an easy mistake to make.

I typically recommend the PackageDev package to people who want to tweak themes/schemes. It gives you a Command Palette option to edit the current theme or scheme. The command will open the default version side-by-side with your overrides, and scrupulously highlights the syntax within the JSON.

1 Like