Django template syntax highlighting

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
Rottweiler
Posts: 2
Joined: Fri Apr 29, 2005 11:16 pm

Django template syntax highlighting

Post 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?
Rottweiler
Posts: 2
Joined: Fri Apr 29, 2005 11:16 pm

Post by Rottweiler »

Can anyone offer any pointers on this? Thanks.
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post 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.
Hope this was helpful.............good luck,
Bob
Post Reply