Sublime Forum

Searching for theme template

#1

Hi,

I want to play a bit around with the UI theming-capabilities of Sublime Text and found the themes documentation.

What I didn’t find was some sort of default template that includes all the elements and can be played around with.

Can someone please point me in the right direction?

Thanks!

0 Likes

#2

I’m not sure if there is an empty / default theme to fill out from scratch, but editing an existing is an easy way to get acquainted with all of the features… With that said:

Install Package Control from the Tools menu, if you haven’t already, or go to the Package Control website and paste some text into the console… Then, install 2 or more of these addons… They’ll help greatly in fine tuning themes, and for studying others…

These 2 are the most important when designing themes…

  • SublimeResourceViewer - Highly Recommended - May actually be named PackageResourceViewer
    • Recommended by someone on this forum - it lets you view single files in a package without extracting it to your %AppData%\Sublime Text 3\Packages\ folder… ( Installed packages are in “…\Installed Packages”, or in your Sublime Text 3 Install folder in one of the folders with Package in the name )…
    • adds PackageResourceViewer commands to the palette
    • Note: I believe the SublimeResourceViewer addon is the one that adds PackageResourceViewer commands to the palette - but because I’m not sure I’ve included both names in the title… I was unable to find PackageResourceViewer as a package in any of my lists ( Install, Remove, Enable, Disable Package )…:
  • ColorSchemeEditor
    • This lets you select text in a file, then choose Select scope and jump to it inside of the color-scheme ( and or vice versa ) for QUICK and easy editing… it opens the color scheme file in a new group on the right. There should be some key-bindings available too, if not they should be easy enough to create as long as a command object exists…

Update your Preferences file to include this ( If Installing Extract Sublime Package ):

Although it may be for a different addon or for Sublime Text itself, I can’t recall where this came from because I organized my Preferences file and it was saved by some plugin and all comments were lost…

Then, update your settings file to include - this is to easily extract files, etc… This may either be a built-in Sublime Text function OR it is from the Extract Sublime Package addon… It pops up a message asking if you wish to EXTRACT THE ENTIRE PACKAGE when you open a sublime-package file inside of Sublime Text… This is the main reason I use it and the Extract ALL packages feature ( although I’ve found it causes more problems than not - additionally, any time you extract files from a package, it’ll take that much longer for it to load because instead of a single file being dealth with, there is typically 10 to thousands… The opening and closing of ‘connections’ and grabbing the data from your hard-drive also takes longer because there is a minimum size for files when stored on your hard-drive ( in mechanicals I know this to be a fact, I’m not sure for ssds, but it is probably the case too )

	"extract_sublime_package_ask_on_open": true,

These can be used as backup, and refinement and testing for color deficiencies…

  • Extract Sublime Package
    • This will let you extract sublime plugins / packages ( The default themes should be in a package called Default, or and some may be in Legacy - which may need to be downloaded )
  • Theme Tweaker Have yet to use but the features seem rich
    • Plus easily seeing if it works in grayscale for those with color perception deficiencies involving all colors except grayscale the hue settings helps those with color perception deficiencies
    • Another quick editor lets you use key-commands to convert a color-scheme to grayscale, change the hue, change colors revolving around a single color and more - I haven’t used this really but it may even edit the file directly…

Note:

Not all default or downloaded themes have ALL of the scopes added… This is somewhat annoying - if you do take the time to go through learning everything there is to about theming - would you mind creating a default / standardized default theme which people can download to edit and create themes with which contains ALL of the available scopes, and some custom ones to show how to create them, etc…? This is a huge ask - and there may already be one available ( double check that first - and look at pre-existing tutorials and examples too ) - but something the community could greatly benefit from… I have some themes I like but they don’t have a lot of the scopes added so the keywords, etc… aren’t colored and it is a huge annoyance so something like this where you can jump in and color away ( see the coloring plugin above to see what I’m talking about along with a color picker addon - there are a few ) would be amazing…

Note: The Default folder may exist by default in the AppData Sublime Text 3 Packages folder…
I hope this information helps!

0 Likes

#3

Note that PackageResourceViewer can not only open a file for you to look at, but also extract an entire package if you want to (although this is by and large a terrible idea and you’re likely to cause severe headaches down the line if you’re not careful). As such you don’t need three packages to do the job there.

If you’re using one of the latest dev builds, Sublime has the ability to open a packaged for direct viewing as well, although that doesn’t work for image files (which you will encounter in themes).

1 Like

#4

Correct - PackageResourceViewer is by far my favorite - although sometimes it is nice to be able to double-click on a package and extract the entire thing ( from Extract Subime Package ) although it may be from something else…

Now, the reason SublimeResourceViewer AND PackageResourceViewer are both listed is because the name is one of the other - I believe it is SublimeResoureViewer which adds the PackageResourceViewer commands because I can’t find PackageResourceViewer in my plugins list, but I can find SublimeResourceViewer - they are both added so one or the other can be installed which-ever the name is…

I should’ve noted that clearly - I’ll edit my post to reflect that…

ColorSchemeEditor is the editor I recommend too because of how it handles loading, jumping between the appropriate scopes, etc… I haven’t tried ThemeTweaker I don’t believe but there used to be another theme tweaker I had installed which had color pickers and preview before saving I can’t recall the name and can’t find it so it may have been a modification of one of the above mods or Theme Tweaker panel ( if it has one )…

0 Likes

#5

Hi,

thanks for the extensive information.

I already figured out that the sublime-package-files are just renamed ZIPs, so extracting them is not a big deal.

I don’t see myself developing some sort of default theme as I - as posted above - just want to play around with the capabilities a bit.

0 Likes