I'm using the awesome Sublime Text 2 to write in TI-NSPIRE/ Ti-BASIC programs for Nspire Calculator, but it has no syntax highlighting for TI-NSPIRE/ Ti-BASIC. It would be handy to add TI-NSPIRE/ Ti-BASIC's commands. Does anybody know how I would create a syntax highlighting set for Sublime?
Asked
Active
Viewed 699 times
1 Answers
2
You'll have to create a new syntax definition for your language. It's basically a set of regular expressions that define scopes, which can then be highlighted using an appropriately-customized theme. If you'd like to look before you leap, browse the Packages
directory (reachable through Preferences -> Browse Packages
) and look for LanguageName.tmLanguage
files in any LanguageName
directory (they may be in a Syntaxes
subdirectory). These are text files are in PLIST or XML format and are viewable within ST2 itself. Good luck!

MattDMo
- 100,794
- 21
- 241
- 231
-
This is a good answer, and I'd rather not make another competing response just to add this suggestion: there's a plugin called [AAAPackageDev](https://github.com/SublimeText/AAAPackageDev) which is *invaluable* in the creation of syntax definitions. – angerson May 29 '13 at 03:17
-
@ProtractorNinja - AAAPackageDev is mentioned right at the top of my first link, which is to the official docs. Great minds think alike :) – MattDMo May 29 '13 at 03:27
-
So it is! I should've checked. At the very least, I've brought more attention to it with redundancy—you know, just in case someone misses how the *entire tutorial* is based on AAAPackageDev. – angerson May 29 '13 at 03:33
-
Thanks. Now Im trying I'm doing as suggested! BUT ... I'm stuck at this point: what does "foldingStartMarker" mean? documentation https://sublime-text-unofficial-documentation.readthedocs.org/en/latest/reference/syntaxdefs.html?highlight=foldingStartMarker I found this: foldingStartMarker Currently ignored. Used for code folding. Some help!? – TRMPereira May 29 '13 at 13:16
-
@TRMPereira - you can ignore this if you don't want to do code folding. It basically matches any line, like the beginning of a class or function, where you would want to fold up the code to make it smaller. Also, if you like my answer, please click the check mark to select it as the best answer - both of us will earn reputation points for it :) – MattDMo May 29 '13 at 13:50
-
@MattDMo Ty for your kind answer... if I have some trouble in the process can u help, more!?! Again: ty for your time! OFF: what we do with reputations points? ;-) – TRMPereira May 29 '13 at 14:35
-
@TRMPereira - If you have further questions, just post and tag them appropriately, and all of us can help you. As for reputation, just read through the [FAQ](http://stackoverflow.com/faq) to find out how StackOverflow and the rest of the StackExchange network works. – MattDMo May 29 '13 at 15:34
-
@MattDMo nothing better than a FAQ, ty again! – TRMPereira May 29 '13 at 16:01