[SVN] Re: Perl qq() sql hightlighting

Brad Choate brad at bradchoate.com
Fri Mar 5 23:28:57 UTC 2010


On Mar 5, 2010, at 3:20 PM, fodnick96 wrote:

> Hi guys,
> 
> I have a quick question. Is there a way to get the SQL highlighting within
> qq () in the perl in textmate?  So if I have 
> 
> my $query_str = qq (
>    SELECT * 
>    FROM FOO
>    WHERE xyz = 2
> );
> 
> I would get the SQL highlighting on select, from and where? Similar to how
> emacs does it?

Try:

my $query = <<'SQL';
   SELECT * 
   FROM FOO
   WHERE xyz = 2
SQL

The "SQL" keyword there triggers the syntax highlighting of the string. Also supported: HTML, XML, CSS, JAVASCRIPT and (oddly enough) POSTSCRIPT.


> Thank you very much.

You're very welcome.

-Brad

--
Blog: http://bradchoate.com/
Twitter: bradchoate
Phone: (925) 271-0105




More information about the textmate-dev mailing list