A Sublime Text 2 Syntax Highlighter

Screenshot: http://sadpanda.us/images/1418064-CUEGT4T.png
Download: https://github.com/cerey/choicescript

I was mainly inspired by @aetheria’s TextWrangler mod and figured I’d make one for Sublime Text 2. In theory this should also work with Textmate as well, but I haven’t tried.

It highlights *commands, #choices, ${stuff}, *comments, (±)variables, stuff in quotation marks, and a todo added for my own convenience (just type TODO or todo anywhere). The screenshot is taken with the Twilight theme, which I find easiest on the eyes.

Install: copy CS.tmLanguage to your package directory, which you can find via Preferences>Browse Packages. Restart Sublime if necessary. If it doesn’t automatically recognize a .txt file as a CS file, you can change it manually via View>Syntax>CS. After the first file it should remember automatically.

If you find something that should be highlighted and isn’t, please do tell me! The source (CS.JSON-tmLanguage) was made with AAA PackageDev if you want to play around with it.

1 Like

Neato! If I weren’t so poor I would totally get Sublime Text and use this instead :wink:

But, now I’m curious about the game in the screenshot… a WIP?

@aetheria Actually, there’s a free version of Sublime available as well, if you want to try it out. It’s a pretty good editor, but the free version bugs you every 100 saves with a popup. Dx

And yeah, it is! However, it’s still pretty far from hatching, because I want to get a big chunk of it done before putting it up for beta.

Please tell me what I’m doing wrong. All the packages appear to have the extension…


…but I don’t see any with an extension of…


…so did I perhaps put cs.tmLanguage in the wrong directory? Or is the directory with all the .sublime-package files the right one? Because when I bring up…


…there is no option for CS.

I think we’ve had this discussion before but I just wanted to point out that there isn’t a “free” version of sublime, it’s an evaluation version. You’re expected to buy it if you find yourself using it regularly. Details I know, by all means use it without paying that’s your choice but for the sake of the developers I wanted to point that out. Strictly speaking not buying it but using it regularly is theft.

Regardless good to see more syntax highlighters! Thanks!

I downloaded it, and I mean this as literally as possible, last night to evaluate it. Never got past trying to get the CS highlighter to work.

Still haven’t gotten the highlighter to work, but Sublime 2 is growing on me quickly.

I don’t use this stuff? what is their purpose? i couldn’t use them in mobiles their make code automatic?

I still have to use proper indentation, but it keeps the lines numbered and in proper alignment.

a ok i got something similar in my android even enumerate the code link, its useful to search error and keep indentation.

Still can’t get it to work, and I messaged the OP privately with no response.

Anyone else?

@DaveDPF I’ve been going without a computer for a while, but I’ll try to get access to one sometime next week and see what I can do. Sorry for the late reply.

@seryou No Problem, I know real life gets in the way sometimes. I’ve lived without it for this long, I can wait a little longer. :wink:

I also followed your instructions on a Mac and wasn’t able to get i to show up as one of the syntax highlighting options.

@DaveDPF @HoraceTorys, try this:

Instead of sticking the .tmLanguage file in ~\Sublime 2\Packages, try putting it in either ~\Sublime 2\Packages\User or ~Sublime 2\Packages\CS (create a new folder for it).

If this turns out to be the solution, I’m going to blush. It’s a pretty silly mistake on my part… @_@

Still can’t get it to show up as an option, and I’ve got it in all the places mentioned.