Home Download Buy Blog Forum Support

Highlight Syntax editing??

Highlight Syntax editing??

Postby cldale on Fri Mar 18, 2011 9:44 am

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. :|

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! :)
cldale
 
Posts: 2
Joined: Fri Mar 18, 2011 9:25 am

Re: Highlight Syntax editing??

Postby guillermooo on Fri Mar 18, 2011 10:02 am

Check this out:

http://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:

https://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.
guillermooo
 
Posts: 725
Joined: Thu Jul 23, 2009 9:06 am

Re: Highlight Syntax editing??

Postby cldale on Fri Mar 18, 2011 11:09 am

Thanks for the quick answer guillermooo.
I'll try to follow that tutorial but it looks still a quite complex to me! :oops:
cldale
 
Posts: 2
Joined: Fri Mar 18, 2011 9:25 am

Re: Highlight Syntax editing??

Postby guillermooo on Fri Mar 18, 2011 11:23 am

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.
guillermooo
 
Posts: 725
Joined: Thu Jul 23, 2009 9:06 am


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 18 guests