Home Download Buy Blog Forum Support

UUID usage

UUID usage

Postby Tuanglen on Fri Dec 13, 2013 9:51 am

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?
Tuanglen
 
Posts: 15
Joined: Wed Aug 22, 2012 8:17 am

Re: UUID usage

Postby MattDMo on Fri Dec 13, 2013 5:03 pm

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.
MattDMo
 
Posts: 36
Joined: Thu Jan 17, 2013 3:15 am
Location: near Boston

Re: UUID usage

Postby Tuanglen on Sat Dec 14, 2013 12:41 am

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.)
Tuanglen
 
Posts: 15
Joined: Wed Aug 22, 2012 8:17 am

Re: UUID usage

Postby jbrooksuk on Sat Dec 14, 2013 11:27 am

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.
jbrooksuk
 
Posts: 781
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: UUID usage

Postby frou on Sun Dec 15, 2013 1:52 am

I include them because I practice SDD (Superstition Driven Development).
frou
 
Posts: 49
Joined: Sun Jul 31, 2011 11:26 am

Re: UUID usage

Postby Tuanglen on Sun Dec 15, 2013 12:37 pm

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.
Last edited by Tuanglen on Thu Dec 19, 2013 12:10 pm, edited 1 time in total.
Tuanglen
 
Posts: 15
Joined: Wed Aug 22, 2012 8:17 am

Re: UUID usage

Postby jps on Sun Dec 15, 2013 11:25 pm

The UUIDs are not used by Sublime Text
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 17 guests