You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah I know embedding VBScript in HTML is evil, but I often need to work with such stuff :(
However, even with VBScript installed Sublime Text 2 thinks that stuff inside <script>-Tags with language="VBScript" is JavaScript... well as I don't really know how to edit tmLanguage files it would be very nice to have this...
If someone got a tutorial how stuff like this (syntax highlighting for other languages) in a tmLanguage file is done, I'd do this my self and make a pull a request...
I guess that must be added to the HTML package, doesn't it? Well I dunno .. :D
Those files often have the extensions .hta (HTml Application), but it's also possible in normal HTML files.
That basically looks like this:
<html>
<head>
<title>some crappy app</title>
<HTA:APPLICATION
APPLICATIONNAME="BullShitOMeter"
ID="objBullShitOMeter"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximize"/>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<script language="VBScript">
Option Explicit
' global definitions
Const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_CURRENT_USER = &H80000001
const REG_SZ = 1
const REG_EXPAND_SZ = 2
const REG_BINARY = 3
const REG_DWORD = 4
const REG_MULTI_SZ = 7
Dim dlg
dim okB ' as integer
dim ynB ' as integer
Sub StartBSOM
' ...'
end sub
</script>
<body>
<!-- normal HTML -->
<div id="container">
</div>
>
<table width = "100%" >
<tr>
...
</tr>
</table>
</body>
</html>
So it is like the JavaScript-script-tag, except that it contains VBScript...
Currently Sublime Text 2 treats everything inside a script-tag like JavaScript, so the syntax highlighting is pretty much botched up (comments are highlighted like strings and stuff like that)
At first glance, looks like there would need to be at least a patch to the built in HTML.tmLanguage file to support other languages beside JavaScript. Another possibility would be to have a new syntax language, something like HTML (VBScript).
Also, sadly, my tmLanguage reading and editing mojo isn't high enough yet - would need to level up first.
Activity
jsadeli commentedon May 14, 2012
Hey enkore, do you have an example of this? I can probably take a look and see what I can do - no promises! :)
In regards to the tmLanguage, I found this or this to be pretty helpful.
enkore commentedon May 15, 2012
Those files often have the extensions .hta (HTml Application), but it's also possible in normal HTML files.
That basically looks like this:
So it is like the JavaScript-
script-tag, except that it contains VBScript...Currently Sublime Text 2 treats everything inside a
script-tag like JavaScript, so the syntax highlighting is pretty much botched up (comments are highlighted like strings and stuff like that)jsadeli commentedon May 15, 2012
At first glance, looks like there would need to be at least a patch to the built in
HTML.tmLanguagefile to support other languages beside JavaScript. Another possibility would be to have a new syntax language, something likeHTML (VBScript).Also, sadly, my tmLanguage reading and editing mojo isn't high enough yet - would need to level up first.