.syn files for imbedded code

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Brad Crockett

.syn files for imbedded code

Post by Brad Crockett »

Has anyone attempted developing syntax definition files that will apply one syntax for the 'parent' association, and different highlighting for imbedded code? For instance, it would be great if there were such a definition for .php that recognized HTML, PHP, JavaScript, and SQL syntaxes all at the same time.
Alex Angelopoulos

Re: .syn files for imbedded code

Post by Alex Angelopoulos »

TextPad just won't do this; it can only use one colorizer at a time.

I've pseudo done this with WSF files (which are XML formatted) by playing a lot with tags; I assigned tags like
<component
<job
<script
<resource
/>

to one keyword class, then set VBScript and Jscript keywords within single keyword classes of other types. This gives a vaguely useful approach, but it may be very annoying to try with HTML since the word choices are much more complex.

One alternative which I use regularly now that I do a lot of multi-syntax files is SciTE; it is free and highly configurable. The core distribution comes with support for HTML with embedded PHP/Python/Perl/VBScript/Javascript already in it..
Post Reply