Label coloring

Label coloring

46
Basic UserBasic User
46

    Feb 27, 2006#1

    Hi all!

    What I want is to color labels in my HTML code:

    Block1: block
    begin

      Process1: process(reset, clock)
      begin
      end process
    Process1;
    end block Block1;

    To be highlighted like this:

    Block1: block
    begin

      Process1: process(reset, clock)
      begin
      end process
    Process1;
    end block Block1;

    The criteria for highlighting (make bold in my case) is a word immediately followed by a colon ":" and then the word "block" or "process".

    Any idea on how to do this welcome.

    Regards from Switzerland.

    6,686585
    Grand MasterGrand Master
    6,686585

      Feb 27, 2006#2

      I think, this could not be realized. Sorry. But you can use this Function String to get the block names in the function list.

      /Function String 1 = "%[ ^t]++^([~:^p]+^):[ ^t]+^{block^}^{process^}"

      or

      /Function String 1 = "^([~:^p]+^):[ ^t]+^{block^}^{process^}"
      Best regards from an UC/UE/UES for Windows user from Austria

      46
      Basic UserBasic User
      46

        Feb 27, 2006#3

        Thank's Mofi,

        I already use Function Strings to get it in the the function list, but
        I expected highlight inforcement in my code. :lol:

        Thank's again for the fast answer.

          Feb 27, 2006#4

          Hi,

          I resolved my problem by using "Keywords starting with string ..." and define a color group for that. I just have to force me to prefix all my blocks by a "b_" and all my processes by a "p_".

          Code: Select all

          /C6"Labels"
          ** b_ p_
          Regards.

          2
          NewbieNewbie
          2

            Apr 25, 2013#5

            It has been 7 years since this questions was posed. UE has developed since.

            Is it possible to colour labels in today's version of UE?

            In my case labels are C-style labels, i.e. a string terminated by a colon.

            Thanks for your answers.

            6,686585
            Grand MasterGrand Master
            6,686585

              Apr 25, 2013#6

              If the labels do not start all with the same substring, the answer is still NO. Also currently latest version 19.00 of UltraEdit does not support regular expressions for syntax highlighting strings consisting of various characters and taking context around into account like must be at beginning of a line, consist only of letters, digits and underscores and end with a colon. The syntax highlighting feature of UltraEdit still works simply with words.

              But the function list view can be now customized to show found strings in a tree view. So it is possible to define a branch for function names with function parameters and function variables as subbranches and another branch for labels.

              2
              NewbieNewbie
              2

                Apr 26, 2013#7

                Regular expression for syntax highlighting would indeed be a versatile manner to allow for features like this. Now I know that this is not possible in the current version, I need not further search for a way to implement this feature.

                Thank you very much, Mofi!