Home Download Buy Blog Forum Support

[Request] Conditional Syntax Hi-lighting for inline scripts

[Request] Conditional Syntax Hi-lighting for inline scripts

Postby Musrum on Fri Aug 23, 2013 4:06 am

I'd like my bash scripts to apply the correct syntax hilighting for inline scripts.

For example, by providing the !SQL hint in the bash script, ST2 will then apply the syntax hi-lighting for any *.sql files to the relevant text.

Code: Select all
#!/bin/bash

sqlplus scott/tiger@ORACLE <<!SQL

SELECT NULL FROM DUAL
/
EXIT
!SQL

echo "All Done"
Musrum
 
Posts: 1
Joined: Fri Aug 23, 2013 3:50 am

Re: [Request] Conditional Syntax Hi-lighting for inline scripts

Postby wwwsevolod on Sun Aug 25, 2013 9:22 pm

oh, it would be awesome for things like diffs browsing etc. +1111
wwwsevolod
 
Posts: 17
Joined: Thu Feb 21, 2013 11:19 am

Re: [Request] Conditional Syntax Hi-lighting for inline scripts

Postby skuroda on Fri Aug 30, 2013 7:42 am

You can do something like this (though it would take some work from you). I embedded html syntax highlighting in the graphviz tmLanguage file. You can take a look at my answer here for a bit more information. If you can identify the being/end patterns(say with your !SQL hint), you can include another defined highlighting definition. If I recall, this is how html/javascript highlighting works.
skuroda
 
Posts: 685
Joined: Fri Oct 05, 2012 8:11 am


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 13 guests