Home Download Buy Blog Forum Support

Syntax Highlighter

Syntax Highlighter

Postby jakecattrall on Tue Mar 18, 2014 11:49 am

Our company CMS uses a templating language that is syntactically similar to Razor, I set out to write a simple highlighting plugin for sublime.

I presumed a simple solution would be available to simply write a regex and color script, but all I found was barebones documentation on what appeared to be an over-complicated solution.
Granted, there appears to be some kind of "code highlighting standard" being used that may in fact be required by more complex programming languages, but for simple templating languages, a lot of steps are really unnecessary.

Better yet, a tool to simplify the process would be great. The AAAPackageDev plugin seems to only be putting lipstick on the pig and there are rumours it's not compatible with ST3.

If anyone can write comprehensive, up-to-date documentation on the subject it would be much appreciated.
Posts: 2
Joined: Wed Jul 31, 2013 1:48 pm

Re: Syntax Highlighter

Postby skuroda on Wed Mar 19, 2014 8:06 am

ST uses the same syntax definitions as textmate. It may be worth looking there for more complete documentation. I believe someone ported AAAPackageDev to ST3, though I'm not 100% sure about that.
Posts: 676
Joined: Fri Oct 05, 2012 8:11 am

Re: Syntax Highlighter

Postby FichteFoll on Fri Mar 21, 2014 5:01 am

Yes, I ported AAAPackageDev to ST3 a few months ago. Please report any bugs if it doesn't work for you.

A nice walk-through for syntax definitions using a YAML variant can be found here: http://docs.sublimetext.info/en/sublime ... xdefs.html. Note that it's in the sublime-text-2 branch of the docs for some reason I don't understand.
Posts: 383
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany

Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 5 guests