I have run across a rather strange error in the syntax highlighting for either vb.vim or html.vim. I'm unsure which is causing the problem. Here are the circumstances under which this error occurs:

I am developing an HTA program. An HTA program (for those who do not use Windows) is an HTML executable program. I'm using vbscript inside of the HTML via the <script> tag to write a small program. What happens is that if multiple lines of comments in a vbscript are placed together with several single character comments sparced between the longer comments, then for some reason all of the code is marked as "Normal" in the syntax coloring. Once this happens, various things such as the "<>" in IF statements turn red (I haven't figured out which syntax coloration this is) and other statements turn green (again, I am still tracking down which of the syntax commands this represents in my color scheme).

I was wondering if anyone else has run across this problem? Here is (off the top of my head) an example of what seems to cause this problem:

Example:

<html>
<head>
<title>Test Program</title>
<script language="vbscript">
   dim i
   dim a
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'BEGIN DOC
'
'-Calling Sequence:
'
'   myFunc()
'
'-Description:
'
'   This function does nothing.
'
'-Inputs:
'
'   None.
'
'-Outputs:
'
'   None.
'
'END DOC
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
   set objFSO = CreateObject( "whatever.FileSystem.Object" )
   set objFile = CreateTextFile( "myfile.dat" )
   set anotherObj = "About this time the lines should turn all one color."

objFSO.stdout.Write "I know this isn't good vbscript - it's just for show"
</script>
</head>

<body>
Test program
</body>
</html>

Usually, as the above line says, all of the lines turn one color. If this doesn't do it for you, then I'll see about sending some code from work that this happens on. But it will look a lot like the above. :-)

Reply via email to