Tapatalk

How do I highlight words with $?

How do I highlight words with $?

3
NewbieNewbie
3

    Aug 10, 2005#1

    Variables in PHP are represented by a dollar sign ($). How do I get the full word to be highlighted?

    Presently I could just only get the dollar sign to be highlighted. The word remains black.

    E.g.
    $var=1;
    $result == 'true';

    Thanks in advance.

    119
    Power UserPower User
    119

      Aug 10, 2005#2

      This is described in the Keywords beginning with a Sub String section of the help for syntax highlighting. Add a color group for variables and use ** to colorize all words beginning with a $. e.g.

      Code: Select all

      /C5"Variables"
      ** $
      You'll also need to ensure that $ is not listed as a delimiter.

      3
      NewbieNewbie
      3

        Sep 20, 2005#3

        Is there a way to highlight only the first 'n' number of characters using the '**' syntax? For example, I might have data=test or data=prog1 and I only want the 'data=' to be highlighted.

        6,685587
        Grand MasterGrand Master
        6,685587

          Sep 20, 2005#4

          Add = to the delimiter characters /Delimiters = and the = additionally to the color group with the substring definition. Then only "data" will be highlighted by the substring specification and = will have the same color. Highlighting only n characters of a substring is not possible.
          Best regards from an UC/UE/UES for Windows user from Austria