[TxMt] Re: textmate perl bundle

Eric Hsu erichsu at math.sfsu.edu
Sat Feb 11 05:38:41 UTC 2006


hi Sebastian Friedrich,

I am copying this reply to the textmate user list (which you can join 
at http://lists.macromates.com/mailman/listinfo/textmate), since I am 
a bit crunched for time right now.

Original request:
>i saw that you are maintaining the perl bundle for textmate. if 
>that's the case, is there any possibility to add html (or even sql 
>for that matter) syntax coloring in HERE documents in similar ways 
>that js/css/php scope is activated within html. I find myself having 
>to edit lots of html within perl scripts (yeah, nobody i work with 
>uses templating) and it would be quite helpful if there's a way to 
>turn on HTML scope within those HERE blocks.
>
>for instance, a HERE keyword like HTML_BLOCK would trigger all 
>content to be html scope with variables ($, @) highlighted as such.
>
>print <<HTML_BLOCK;
>[HTML]
>HTML_BLOCK
>
>any chance you would like to implement that or could give me some 
>hits on how to get this to work. Thanks so much in advance.

I think this should be pretty straightforward, declaring the .heredoc 
scopes to inherit styling from html (in cases where all heredocs are 
HTML styled) or making a new .heredoc-html scope to match only names 
with "HTML" in them which then inherit from HTML styles.

Could someone on the list help out with details?

best wishes, Eric
-- 
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu at math.sfsu.edu
http://math.sfsu.edu/hsu



More information about the textmate mailing list