I just posted an answer @ StackOverflow the other day that implements a dictionary.
You can implement a similar dictionary pattern with the code @kingkeith provided above.
Edit:
@kingkeith, I just noticed that you used
syntaxes = [('<?php', 'Packages/PHP/PHP.sublime-syntax')]
for text, file in syntaxes:
Is [ ( "string_1" , "string_2" ) ]
similar to using a dictionary? I’ve never seen that pattern…
Can you use it like:
[ ( "string_1A" , "string_1B" ), ( "string_2A" , "string_2B" ) ]
?
I was in the same boat about a year ago when I first started working with Python & SublimeText.
I’ve managed to cover a good amount of ground since then, and have compiled a list of some helpful resources to get started with.