Sublime Forum

Highlight Syntax editing?

#1

Hi,

I am not a programmer but would like to use Sublime for editing complex text input files for a simulation program.
I would like to create a new Highlight Syntax for it but I am not sure how to do it.

I have searched a little on the forum but found no proper answer, sorry.
I had a look at the *.tmLanguage files the existing packages but it’s pretty rough for me to understand them without any documentation. :neutral_face:

What I am trying to achieve is quite simple: change the comment character, the colors, add some keywords, define the folder opening and closing markers, and that’s it.

Thanks for the help! :smile:

0 Likes

#2

Check this out:

sublimetext.info/docs/extensibil … xdefs.html

That covers the creation/editing of syntax definition rules (adding keywords, etc.), but not color schemes (assigning scopes colors). The format for color schemes is XML and I daresay easier to grasp than that of syntax definitions.

There’s a package required for the examples to work as advertised, but I’m not sure it will work now. Use this one instead if you’re using Sublime Text 2:

bitbucket.org/guillermooo/aaapackagedev

One more thing: Once installed, you can access some items in AAAPackageDev via an invisible menu item located just before “File”. This is due to a bug in Sublime, but the menu items should work nevertheless.

0 Likes

#3

Thanks for the quick answer guillermooo.
I’ll try to follow that tutorial but it looks still a quite complex to me! :blush:

0 Likes

#4

Yep, in order to create/modify syntax defs you will need to learn a bit about regular expressions. You don’t need to know any programming for that, though.

0 Likes