Page 1 of 1

Django template syntax highlighting

Posted: Sat Feb 27, 2010 2:34 pm
by Rottweiler
Does anyone know how feasible it would to get TextPad to syntax highlight Django templates?

Using html.syn works fairly well, but the Django template elements are just colored as text rather than as a "special" item.

Mostly it would need to colorize anything that looked like either of these:

Code: Select all

    {% block content %}
    {{ blog.title }}
I looked at the help that explains the .syn files but it wasn't obvious how to get it to colorize something of the {%...%} or {{...}} form.

Any help?

Posted: Sat Mar 06, 2010 1:25 pm
by Rottweiler
Can anyone offer any pointers on this? Thanks.

Posted: Sat Mar 06, 2010 3:16 pm
by Bob Hansen
The current syntax tool cannot use RegEx or wild cards like braces or brackets. It only handles whole words. You will need to enter each value with the surrounding characters.