Sublime Forum

Theme development question

#21

Thanks again @deathaxe - much appreciate it!

0 Likes

#22

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.

0 Likes

#23

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.

1 Like

#24

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.

0 Likes

#25

Canā€™t you use the ā€œview package fileā€ command shipped with sublime?

0 Likes

#26

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.

3 Likes

#27

Now its possible change the colors of git diff?

0 Likes

#28

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. :slight_smile:

2 Likes

#29

@wbond nice to know, but in Scheme or Theme? How can I change the color if is in theme?

0 Likes

#30

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).

1 Like

Dev build 3186
#31

Thanks @OdatNurd.
Very good. How do you know these changes if they were not yet available in the documentation? I apologize for my ignorance.

0 Likes

#32

There tends to be a bit of discussion after each build on the Discord server.

The documentation will hopefully be coming soon.

6 Likes

#33

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?

0 Likes

#34

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.

1 Like

#35

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 :slight_smile:

0 Likes

#36

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!

0 Likes

#37

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.

1 Like

#38

Thank you sir. Appreciate you taking the time to respond and answer my question. Giving this a thinkā€¦

0 Likes