Loading ...
Sorry, an error occurred while loading the content.

RE: Syntax Highlighting glitch report with VBScript ASP

Expand Messages
  • Arjona, Ariel
    Sorry for the attachment. Saw the Convert to HTML option once, but didn t come to my mind this time (really useful BTW). I am using ASP for VBScript. :set
    Message 1 of 5 , Dec 27, 2000
    • 0 Attachment
      Sorry for the attachment. Saw the "Convert to HTML" option once, but didn't
      come to my mind this time (really useful BTW).
      I am using ASP for VBScript. :set syntax ? yields "aspvbs".
      Normally with ASP '<%'s and '%>'s appear purple on my system. 'rsTemp(' and
      ')' should appear white, while '"p_src"' should appear in dark green.

      this is what I see:

      <HTML>
      <HEAD>
      <TITLE>Default.asp.html</TITLE>
      </HEAD>
      <BODY BGcolor=#000000 TEXT=#b3b3b3>
      <PRE>
      <FONT color=#6a5acd><</FONT><FONT color=#99ccff>img</FONT><FONT
      color=#6a5acd> </FONT><FONT color=#00ff00>src</FONT><FONT
      color=#6a5acd>=</FONT><FONT color=#009900>"</FONT><FONT
      color=#6a5acd><%=</FONT>rsTemp(<FONT color=#009900>"</FONT><FONT
      color=#6a5acd>p_src</FONT><FONT color=#009900>")%>"</FONT><FONT
      color=#6a5acd>></FONT>
      </PRE>
      </BODY>
      </HTML>

      'p_src' turned blue while ')%>' turned dark green (the parenthesis should be
      white and the %> dark blue).


      > -----Original Message-----
      > From: Benji Fisher [mailto:fisherbb@...]
      > Sent: Wednesday, December 27, 2000 2:56 PM
      > To: Arjona, Ariel
      > Cc: Vim Mailing List (E-mail)
      > Subject: Re: Syntax Highlighting glitch report with VBScript ASP
      >
      >
      > "Arjona, Ariel" wrote:
      > >
      > > Hi all,
      > > Just wondering if anybody else has seen this.
      > >
      > > In the lines like this:
      > > <img src="<%=rsTemp("p_src")%>">
      > >
      > > vim seems to have problems with the quotes and colors the closing %>
      > >
      > > Attached is a little screenshot of what I see.
      > >
      > > My vim is gvim 5.7 on Win2k Pro.
      >
      > What syntax are you using: html or one of the derived
      > syntaxes, or
      > something else? (What does vim reply to :set syntax ?) When
      > I put the
      > above snippet into an HTML file, the pieces "<%=rsTemp(" and ")%>"
      > are colored as strings; is that correct?
      >
      > BTW, instead of sending a jpeg, you could send HTML. (On my
      > system, 47K is no problem for an e-mail, but some members of the list
      > might care.) You can
      >
      > :source $VIMRUNTIME/syntax/2html.vim
      >
      > or us the "Convert to HTML" entry from the Syntax menu in gvim to
      > produce an HTML version of your file, with syntax highlighting intact.
      >
      > HTH --Benji Fisher
      >
    • Devin Weaver
      ... I see what your saying I *BELIEVE* The VBS code is rendering properly it s the HTML code that s getting caught up in it. I could be totally wrong and I
      Message 2 of 5 , Dec 27, 2000
      • 0 Attachment
        On Wed, Dec 27, 2000 at 03:17:55PM -0500, Arjona, Ariel wrote:
        > this is what I see:

        I see what your saying I *BELIEVE* The VBS code is rendering properly it's the
        HTML code that's getting caught up in it. I could be totally wrong and
        I pray Claudio corrects me here.

        The HTML code starts a string with the first " and ends it at the next
        " found. In the string it realizes the <% and starts the VB rendering.
        But since it is unaware of the ASP syntax it stops it's rendering of
        the VB at the first ". A possible fix would be to add skip=+<%\{-}%>+
        in the HTMLString region. I don't think this is a preferable
        solution as this places ASP specific code into the HTML syntax.
        Without actually tracing the scripts I'm speak purely speculative.

        Claudio care to expand on this?

        --
        It's not enough to be Hungarian; you must have talent too.
        -- Alexander Korda
      • Arjona, Ariel
        That worked great, thanks a lot. Also thanx Devin Weaver and Benji Fisher for the input.
        Message 3 of 5 , Dec 28, 2000
        • 0 Attachment
          That worked great, thanks a lot.
          Also thanx Devin Weaver and Benji Fisher for the input.

          > -----Original Message-----
          > From: Claudio Fleiner [mailto:claudio@...]
          > Sent: Wednesday, December 27, 2000 6:35 PM
          > To: benji@...
          > Cc: Ariel; Vim Mailing List
          > Subject: Re: Syntax Highlighting glitch report with VBScript ASP
          >
          >
          > "Arjona, Ariel" wrote:
          > >
          > > Hi all,
          > > Just wondering if anybody else has seen this.
          > >
          > > In the lines like this:
          > > <img src="<%=rsTemp("p_src")%>">
          > >
          > > vim seems to have problems with the quotes and colors the closing %>
          > >
          > > Attached is a little screenshot of what I see.
          > >
          > > My vim is gvim 5.7 on Win2k Pro.
          >
          > In html.vim remove the keepend in the two htmlString
          > definition lines (around
          > line 21) and it should fix your problem. I cannot remember
          > right now why I put
          > the keepend there, but there must be examples where its
          > needed, need to
          > investigate more.
          >
          > Claudio
          >
          > --------------------------------------------------------------
          > --------------
          > Claudio Fleiner
          > claudio@...
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.