Sublime Forum

UUID usage

#1

I’m creating my own custom color scheme (not a .tmLanguage syntax file, just a .tmTheme color scheme, if the difference matters) using the default schemes as syntax templates, and I noticed they all had UUIDs at the bottom.

So,

  1. How does Sublime use these? Usually these things disambiguate cases where items from different sources end up with the same names, but specifying a color scheme in Preferences is done by filename, not UUID (as far as I know), so how is the UUID used by Sublime?

  2. What syntax does that usage require?

I noticed a UUID generator plugin for Sublime that looks useful, but its docs say it can produce several different UUID syntax without mentioning which one is used for what. I can’t find it documented anywhere else, either. Does anyone know?

0 Likes

#2

The UUIDs were mainly used by TextMate to classify which file was a part of which bundle. I’m not sure exactly how .tmTheme UUIDs are used by Sublime, but if you’re making a new theme it would be safest to change the UUIDs, just in case.

In the case of .tmLanguage files, the UUIDs are used, so if you’re making a new language definition and you want it to show up separately on the syntax list, changing the original UUID is necessary.

If you use the UUID package, just use UUIDv4 - that’s the version used in TextMate and Sublime.

0 Likes

#3

Thanks, Matt!

(And if anyone else knows how Sublime uses these UUIDs, I’d still be interested to know. Maybe I will create a .tmLanguage file at some point, or maybe someone else who googles Sublime UUID will want to know.)

0 Likes

#4

I think they’re just in tmTheme files for the historical reasons. The majority of default themes were originally for TextMate, so I think it was a carbon copy. They’re there, because they were in TextMate.

0 Likes

#5

I include them because I practice SDD (Superstition Driven Development).

0 Likes

#6

Ah, yes, SDD. I’m guessing the onion in the varnish (http://blog.garrytan.com/if-you-cant-remember-why-onions-are-in-there) makes every color scheme better looking.

0 Likes

#7

The UUIDs are not used by Sublime Text

0 Likes