Syntax highlighting on inline ASP

Syntax highlighting on inline ASP

4

    Jun 28, 2006#1

    I am coding classic ASP with VBScript , HTML and JavaScript. I am using a different font colour for each language so I can easily see which language is which. In general this feature works great except for one instance.

    Whenever I am inserting ASP inline with my HTML it does not change the font colour. For example.

    Code: Select all

    <input type="text" name="txtTitle" value="<%=myVariable%>">
    In this case, the VBScript (myVariable) does not have it's colour changed. The font colour stays the same as the base colour for HTML. Is there a way to get it to show up in the colour I have selected for VBScript?

    6,683583
    Grand MasterGrand Master
    6,683583

      Jul 02, 2006#2

      No! I think, the multi-language highlighting is based on blocks. The highlighting of the VBScript will start at the line after <% and will be used till %> is found. An inline VBScript code like in your example will not be highlighted with the VBScript color settings. That's what I can see. I don't really know, if this is by design or a bug.
      Best regards from an UC/UE/UES for Windows user from Austria

      1
      NewbieNewbie
      1

        Re: Syntax highlighting on inline SQR

        Aug 03, 2006#3

        I am using UltraEdit32 for SQR coding. I didn't find commands highlighted. Could you help me out how to see commands, functions highlighted with different colours??

        6,683583
        Grand MasterGrand Master
        6,683583

          Aug 03, 2006#4

          For SQR (what is this?) see page Downloads - Extras - Wordfiles on this website. At top of this page is explained how to add a wordfile for a language to your existing wordfile which already contains definitions for some languages.

          I guess, PeopleSoft SQR - NEW - 04/14/2004 is the one you need.

          After adding the content of this file to your existing wordfile, you should already see your SQR files now highlighted. The color settings and more can be changed at Configuration - Editor Display - Syntax Highlighting.

          Note: The wordfile for PeopleSoft SQR was created by an other UltraEdit user and not by IDM. So it could be not perfect or up-to-date and maybe needs some modifications and additions to fit to your needs. There is a big help page about Syntax Highlighting.

          4

            Aug 23, 2006#5

            The funny thing about this problem is that syntax highlighting for keywords works for inline VBScript. It just doesn't change the basic color of regular code text

            Code: Select all

            <input type="text" name="txtTitle" value="<%=Request.Form("txb")%>">
            This line of code will have the "Request" and "Form" coloured correctly for VBScript objects and methods and the "txb" will be coloured correctly for a string. Even the ( and ) are coloured the way I want for operators, but my original example does not have the "myVariable" coloured. It only colours correctly if the VBScript begins on the next line.

            Code: Select all

            <% Line#1
            Line#2
            %>
            In this example Line#1 is incorrectly coloured but Line#2 is correct.