-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Sublime Text color schemes #198
Comments
For color schemes to work, they need to have specific scopes added to highlight the diffs, so at the moment this feature would not be useful. |
Here is some info on how to customize the color scheme used in Sublime Merge. This is going to work best for builds 1105 and newer. This is because new builds will automatically generate some necessary scope rules for the inserted and deleted regions of the diff view. Before then, each color scheme would need to be customized. However, I don't believe every scope will be auto-generated, so the example at the end of this comment may be of use. Since Sublime Merge is more complex than Sublime Text in its interface, there are actually a few different places that color schemes are used:
Each of these has a settings file that controls the editor control used. Beyond that, each theme has it's own version of the settings file for each editor control. The format for the settings files is:
So, if you are using the theme "Merge", the files will be named:
If you are using the theme "Merge Dark", the files will be:
In each of those files is a setting named Thus if you are using the theme "Merge", you should create files:
In each of those, put the following content: {
"color_scheme": "My.sublime-color-scheme"
} Sublime Merge will load If you want to customize the diff regions in your color scheme, you can create a customization (https://www.sublimetext.com/docs/3/dev/color_schemes.html#customization). You'll want to support the following selectors for compatibility. The following example is what was added to Mariana to support Sublime Merge (in addition to its baseline support of Sublime Text): {
"rules":
[
{
"scope": "diff.deleted",
"background": "hsla(357, 45%, 60%, 0.15)",
"foreground_adjust": "l(+ 5%)"
},
{
"scope": "diff.deleted.char",
"background": "hsla(357, 60%, 60%, 0.30)",
"foreground_adjust": "l(+ 10%)"
},
{
"scope": "diff.inserted",
"background": "hsla(180, 45%, 60%, 0.15)",
"foreground_adjust": "l(+ 5%)"
},
{
"scope": "diff.inserted.char",
"background": "hsla(180, 60%, 60%, 0.30)",
"foreground_adjust": "l(+ 10%)"
},
{
"scope": "diff.deleted.side-by-side",
"background": "hsl(210, 15%, 27%)",
"foreground_adjust": "l(+ 5%)"
},
{
"scope": "diff.inserted.side-by-side",
"background": "hsl(210, 15%, 27%)",
"foreground_adjust": "l(+ 5%)"
},
{
"scope": "diff.fill",
"background": "hsl(210, 15%, 27%)",
},
{
"scope": "diff.inserted.merge-left",
"background": "hsla(180, 25%, 60%, 0.15)",
"foreground_adjust": "l(+ 5%)"
},
{
"scope": "diff.inserted.char.merge-left",
"background": "hsla(180, 40%, 60%, 0.30)",
"foreground_adjust": "l(+ 10%)"
},
{
"scope": "diff.border.merge-left",
"background": "hsla(180, 40%, 60%, 0.50)",
},
{
"scope": "diff.inserted.merge-right",
"background": "hsla(60, 25%, 40%, 0.15)",
"foreground_adjust": "l(+ 5%)"
},
{
"scope": "diff.inserted.char.merge-right",
"background": "hsla(60, 40%, 60%, 0.30)",
"foreground_adjust": "l(+ 10%)"
},
{
"scope": "diff.border.merge-right",
"background": "hsla(60, 60%, 60%, 0.50)",
},
{
"scope": "diff.border.merge-conflict",
"background": "hsla(357, 75%, 65%, 0.50)",
},
{
"scope": "diff.border.merge-merged",
"background": "hsla(180, 10%, 70%, 0.30)",
},
{
"scope": "blame.border",
"background": "hsl(210, 13%, 30%)",
},
{
"scope": "blame.age-icon",
"foreground": "white",
},
{
"scope": "source.sublime-merge.preferences.git_binary",
"foreground": "white",
},
]
} |
Is there a reason this doesn't work on Windows? Does windows not source Sublime Text packages? I've tested this out on Linux, but can't get it to work on Windows. EDIT: I think when I copied and pasted the file names to override, I picked up some invisible characters from GitHub. It caused my names to not be correct. Once I fixed that, all was once again working. |
The only way I could pull this off in Windows was to override Mariana.sublime-color-scheme. |
how can I set the theme of the sublime merge to dark? I am not talking about any customization. I just want to have a dark mode. is there not a simple way? or do I need to make tons of new files? UPDATE I just discovered this Should a simple feature like a dark theme be reserved for registered users? UPDATE Sorry to say but I am extremely disappointed with Sublime merge. Some blog articles motivated me to try out sublime. Sublime text is cool for a text editor, but not possible to use it as a full-time code editor. What I love about the sublime is that it loads damn fast. I hope that someday I will get the speed of sublime and the comfort of VS code |
Hi @aahnik, Sorry to hear you're disappointed with Sublime Merge. If you could, I'd appreciate if you could share any feedback so that we can improve your experience. With regard to the dark theme: Once you've added a valid license, you can switch between light and dark theme using the toggle in the preferences. If you have any suggestions on how to simplify this process I'd love to hear them. Kind regards, |
Hi @dpjohnst, Thanks for listening. I have already given my feedback, expressing my disappointment with the dark theme being a premium feature.
By the way, from today I am going to use sublime text instead of gedit when I need to do small text edits. But VS Code remains my choice when I sit for long coding hours. I got this idea from this video https://www.youtube.com/watch?v=L8QzFU0k5OA by @KalleHallden In short, sublime is fast responsive, and snappy but lacks the ease of use and advanced features of VS Code. My dream editor is that which is
I may sound childish, by dreaming of such things. But I believe this is what the market needs right now. If such an editor comes to the market, I am sure that 99 % of people will switch to that. Thanks a lot for actively listening to your customers. |
I don't know. I don't mind to say that I didn't switch to VSCode just because I've heavily customized my ST and I am lazy to re-customize and re-learn an editor. https://onivim.io/ is probably your dream if you are familiar with VIM. |
@jfcherng I agree with you that switching is hard. VS Code is my life's first editor and I have been spoilt by it. Not seeing enough reasons to learn vim. And about https://onivim.io/, the first page asks you to pay. I am not interested in any paid product currently as I am a student, and products in dollars are much expensive, from an Indian perspective. ( just compare the cost of living and dollar conversion rates ) |
The market has always needed this, imo, the reason it's still just a dream is that it's extremely hard to make, especially free and open source. You'd need a complete team of full time devs, for years, to pull something like that off. You see the thing is ST is a 'plain' text editor with plugins. VSCode on the other hand is an editor which can also be a complete IDE. To make that happen though, you need a much more extensive plugin system, allowing more elaborate language services to make debugging work properly, etc. Which has an effect on performance (though arguably VSCode being Electron-based also doesn't help). All due respect, but imo it's a bit unfair to come here complaining you have to pay for certain features: it was the authors decision to use this type of licensing because they also need to make a living. |
Onivim is free for students and hobbyists, you just need to build it from source yourself. |
@theol0403 thanks a lot for pointing. I will definitely try it out. I just read the README of onivim. It sounds promising.
Hi @stinos , Initially, I came here in search of "how to set dark mode". But at the same time, let me make it clear that I respect the author's decision of licensing. And I feel deeply grateful to all those people who made these awesome tools to make the world a better place. |
I spent a few hours yesterday to find out where exactly the mentioned Sublime Merge specific scopes are used, and to add some nice looking colors for them into my color scheme. Here is where I found the scopes, so that other users or color scheme authors can benefit from it and don't have to use lots of trial and error to find which parts of the UI are affected: |
My custom Monokai Pro setup, if anyone is interested: In
With theme set as Monokai Pro as per above posts. I extracted the original theme from |
This is just what I would like my Sublime Merge set up to look like! Can you share any more information how you got it set up? I am also using Monokai Pro (filter machine version). |
Sadly a case of poor documentation on Sublime's part. Sure we have a reference manual, but there's no minimum example of how to extend a theme or extend a color scheme, particularly in Sublime Merge. @dpjohnst re: Feedback on this rabbit hole. ANYWAYS @bitsper2nd did some wonderful work on this. For anyone following, give these a second look.
These are simple, beautiful and they work. Anyone listening at Sublime HQ, PLEASE fix your docs to show some basic theming examples of extending themes and extending color schemes. |
Thanks for the kind words! Here is my new WIP. Mariana for Sublime Merge. |
Version
Description
The typical Sublime Text color scheme options are currently missing, e.g. Monokai, Twilight etc.
Preferred solution
Availability as menu option (similar to Sublime Text) -> Preferences -> Color Scheme...
The text was updated successfully, but these errors were encountered: