Sublime Forum

Built in support for global Text & Merge theme and syntax color schemes

#1

I’m new to Sublime family but liking both Text & Merge so far. How on earth I’ve managed to overlook such gems for so long is beyond me!

Anyways, having just switched to Text & Merge as my daily drivers I think the first very obvious shortcoming is the separate UI theme & syntax management per app. Surely if user purchased both Text & Merge apps he would prefer a single global UI & syntax color scheme, not? Most developers I know would waste days on setting things the way they like and that usually includes applying a common color scheme across all apps from email clients to terminals, editors and CVS.

I think a preference option to allow for global UI & syntax schemes for both Text & Merge apps (and hopefully any other Sublime productivity apps coming our way in the future) would be super useful.

Before you send me to 3rd party Text->Merge color scheme syncing addon packages: I tried this already. It sort works for some syntax themes but not everything synced correctly. Really I think a built in stock syncing option a must.

Any opinions on this?

0 Likes

#2

Merge can already use any color scheme that is currently being used in Sublime Text. You don’t even need to install the color scheme in Merge, it will use the one in Sublime Text. The theme in Merge dictates what color scheme is being used though.

Currently, Merge only ships with the light and dark theme. There may be more themes, but the only 3rd party themes I know that are available currently are https://github.com/meetio-theme/merge-meetio-theme and https://github.com/facelessuser/merge-dracula-theme.

While the theme engine is the same for both Sublime Text and Merge, a Sublime Text theme will not style all of the required Merge elements. The interfaces are just so different, so Sublime Themes are not used in Merge.

Could Sublime Text and Merge, someday in the future, somehow generalize all of their UI bits and such to be themed in a generic way? Maybe? :man_shrugging: I can’t speak to the challenges there.

Also, currently, there is no plugin system for Merge yet (though it appears to be on the roadmap). So there isn’t really anything like Package Control for Merge yet either.

0 Likes

#3

I’m sure the creative modding community already has or will find ways for custom theming & syntax coloring :slight_smile: But it would be super useful if there was a built in Sublime apps wide global theme & syntax support. Without having to hunt for, manually tweak colors and edit config files etc…

0 Likes

#4

Using Sublime Merge to download packages from github is not that different from using package control. Really simple to do. I’m a fan of @facelessuser Dracula Theme port. Just download the repo(folder) on ST or SM /Packages(folder.)

you can set a dark color scheme and light color scheme eme in sublime text. It will change according to your global system settings. Here is an example using the IA Writer color scheme.

      "color_scheme": "auto",
      "light_color_scheme": "Packages/Writer Color Scheme/Writer.sublime-color-scheme",
      "dark_color_scheme": "Packages/Writer Color Scheme/Writer Dark.sublime-color-scheme",

0 Likes

#5

I have no issues selecting UI themes nor syntax schemes in Text. Either installed via package manager or those downloaded / cloned manually from public Github repos and elsewhere. For UI themes I think I can survive with stock Light and Dark themes in both Text & Merge.

The biggest issue I have is taking the same syntax color scheme I use in Text and use it in Merge. Please note I’m talking about syntax color scheme, not UI theme. The color schemes appear to be incompatible between Text and Merge. Not just the extra diff categories missing but literally. I wasn’t able to force Merge to load any of .sublime-color-scheme format schemes by pointing to it from Merge’s preferences file. Found more info on Merge color shcemes here: https://github.com/sublimehq/sublime_merge/issues/198

But one can dream and hence this feature request. Add some support for global Sublime wide Themes and Schemes. I don’t see why it wouldn’t be possible to add the Merge / diff specific color categories to .sublime-theme and .sublime-color-scheme files so that they are useable for both Text & Merge apps. Even if some of these color definitions are redundant / unused in Text or Merge apps. On the positive side though when someone is creating a Sublime UI theme or color scheme he can cover both apps in one go with a single file / package.

0 Likes

#6

Well until then, here is the Dracula Theme for both ST and SM. Like @facelessuser wrote before, we’ll have to wait and see.

For Sublime Text, simply press ctrl + shift +p to open the command palette and select the color scheme.

For Sublime Merge, you will have to go to the hamburger menu preferences and select edit settings to add the dracula theme variant you want:

"theme": "Dracula Pro (Alucard).sublime-theme"

0 Likes

#7

This package here does the trick but few colors may look funny. It is a hit and miss depending on the color scheme. Some color schemes get translated perfectly fine.

But my point is this. If a 3rd party developer can do it and get almost (95%) right with a tiny python script, surely it is not that big of a deal for Sublime to implement some form of native color scheme syncing support between the two apps …

0 Likes

#8

Again, the color schemes don’t have to be synced between Sublime and Merge as Merge will source them from Sublime. The theme just needs to be updated to point to the desired color scheme. That is all the referenced script does. It just makes the Merge theme point to the same color scheme that Sublime Text is using. That is the only “syncing” that is occurring.

So, for the default Merge themes, this will change panels/inputs that use the color scheme and only those panels/inputs (unless a given theme dynamically changes panel colors based on the color scheme which the default themes do not).

Additionally, Merge provides a default color for certain Merge colors if they are not found in a color scheme, but it may be good to specify Merge specific colors if they are not defined for better colors. Many color schemes will simply rely on the default, and your milage may vary depending on the theme. Additionally, as mentioned above, not all UI elements are dependent on the color scheme in Merge’s default themes, so :man_shrugging:.

0 Likes

#9

OK, lemme word it slightly different. As things stand it is a hassle to get Merge diffs looking like it is the same color scheme as in Text. Whatever the specifics of the internals doesn’t really matter. Having to understand how and what is being referenced from where, as well as fiddling with the Merge theme to pick the right scheme from Text is already a chore.

The point here is that it doesn’t magically work out of the box and a built in option to make it “just work” would be super useful don’t you think?

0 Likes

#10

I was more explaining why a “few colors may look funny”. I was going into the internals, point out that you are getting exactly the same highlighting colors as Sublime Text. There isn’t really any adaptation of the colors from Text to Merge except for missing Merge specific colors.

The point here is that it doesn’t magically work out of the box and a built in option to make it “just work” would be super useful don’t you think?

With all of that said, yes, it would be nice if it were easier to just specify a color scheme. Like a simple option to just to set the color scheme, and all relevant panels would use the specified color scheme.

There are reasons why I think they haven’t done this (at least yet), but I won’t go into all of that.

0 Likes