Mutiple Language Syntax Highlighting.

General questions about using TextPad

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

Post Reply
Rainaer
Posts: 1
Joined: Wed Jan 18, 2006 4:38 pm

Mutiple Language Syntax Highlighting.

Post by Rainaer »

I write Many of my Perl apps with embedded SQL . it there a way to get the syn files to recognize and highlight BOTH Perl and SQL within one piece of code... and perform this correctly?
Cringing Dragon
Posts: 7
Joined: Fri May 04, 2007 11:39 pm

Want to access multiple syntax definitions in the same file

Post by Cringing Dragon »

I'd also like to be able to do this (different languages in my case, but same concept - one language/syntax embedded inside another). I've been hunting the forum, but haven't found an answer yet.

Some of the syntax definitions contain keywords for multiple languages (I think there's a combined html/javascript one), but I'd need more than just keywords - the languages I need to nest have completely different usage of quotes, braces and some operators.

My only option at present seems to be to swap between syntax definition files depending on which piece of the code I'm working on at the time. At least this is easy to do (View - Document Properties or Alt+Enter if you're using the default keyboard preferences).
Post Reply