Can someone tell me what area I need to look at in order to style this (it’s the package control window) - thank you.
Theme development question
The Command Palette and the Quick Panels used by several plugins such as Package Control should be represented by the overlay_control
in a theme, if I recall correctly.
The text input can be addressed via
{
"class": "text_line_control",
"parents": [
{
"class": "overlay_control"
}
],
},
There are quick_panel
, quick_panel_row
and mini_quick_panel_row
entities as well, but I am not sure whether they belong to normal quick panels or the switch_project_window
.
I need to be able to export the current theme, in order to place the various elements within the folder (theme container) correct? For some reason I can’t export using package resource viewer and I can’t understand why.
If you’re on the most recent dev build, there is a weird interaction between it and PackageResourceViewer; it doesn’t generate any obvious errors anywhere, but when it opens a resource it’s always empty. I’ve been meaning to investigate that (I’m not the developer of that package, but I do use it a lot) but I haven’t had the time lately.
Thanks @OdatNurd. I think I’m going to downgrade to latest stable for time being so I can get this thing cleaned up and shipped out - I’ll throw it up on github shortly so others can help with development.
You can view individual resource files with View Package File
, but you can’t make any edits to them if they’re coming from a sublime-package
file because those files are read only. The exception there is if you have an override on a file, since in that case the override is already unpacked and in the Packages
folder.
PackageResourceViewer opens all resources in a way that you can edit them and save, and if the resource is from a sublime-package
file, it will automatically create the override for you (i.e. create an appropriate folder structure in Packages
and saves the file there).
To do that with View Package File
you need to Save As
the file, create the folder structure yourself, and then close and reopen the file (because Sublime opens it read only).
Also PRV lets you extract the entire contents of a sublime-package
in one shot to your packages folder, although generally speaking that’s not a good idea (that command should really confirm with you first or something) because doing so essentially creates overrides for an entire package at once, which makes future updates to the sublime-package
file invisible.
It has been possible to change all three colors the entire time, we just weren’t using the line_diff_added
or line_diff_deleted
colors before 3189.
@wbond nice to know, but in Scheme or Theme? How can I change the color if is in theme?
The color options go in your color scheme. So for example, if you use the default Monokai as your default color scheme, you’d put this into a Monokai.sublime-color-scheme
file in your User
folder:
{
"globals":
{
"line_diff_added": "var(yellow2)",
"line_diff_modified": "var(blue)",
"line_diff_deleted ": "var(red)",
}
}
That makes added lines green (paradoxically, given the variable used), deletes red, and modifications blue. If you don’t have those options, the closest colors to green, yellow and red in your color scheme are used in their place.
Here I’m specifically overriding the modification color to be blue because I prefer that to yellow (and in Monokai, the green and yellow are too similar looking for my eyes to distinguish at the side of the diff bar).
Dev build 3186
Thanks @OdatNurd.
Very good. How do you know these changes if they were not yet available in the documentation? I apologize for my ignorance.
There tends to be a bit of discussion after each build on the Discord server.
The documentation will hopefully be coming soon.
I’m trying to add these new settings to my color schemes, but it doesn’t seem to have any effect. The circles next to the files in the tree are still blue. I should do it like this right?
{
"globals": {
"line_diff_added": "#00ff00"
}
}
Any ideas?
The side bar icons are part of the theme, whereas the line_diff_*
settings in the color scheme affects the diff markers drawn in the gutter. The next dev build will include updated docs about the new theme and color scheme features relative to Git.
OK, thanks, that makes sense. I will wait for the updated docs for the theme settings then!
BTW: I think the diff lines are a nice addition because they don’t interfere with linting error markers anymore
Not sure if this has been asked (lazy, drinking wine while I do a little coding). Is there a plugin that provides a side bar of some sort (note the screenshot is from Atom, but I’m currently hacking on sublime text, because it’s just better).
Thanks in advance for any assistance. Very much appreciate!
Sublime has a file-related side bar, though you’ve probably already discovered that. It can be toggled away via the View > Side Bar > Show Side Bar
menu entry or associated key binding. It can display the contents of folders that you’ve opened as well as the names of opened files (if you want it to), but it will remain hidden if it has nothing to display. So if you don’t open a folder and also don’t turn on open file display (or you do but there are no open files, it won’t display).
It’s not possible to add the additional side bar that’s along the left side of the window, however. There’s not any API for extending the user interface in that way (including controlling what’s in the side bar in general other than files and folders).
Themes can control the visual display of the existing elements, but they can’t really add new ones.
Thank you sir. Appreciate you taking the time to respond and answer my question. Giving this a think…