Label coloring

Syntax highlighting, code folding, brace matching, code indenting, and function list

Label coloring

Postby palou » Mon Feb 27, 2006 10:09 am

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 ":" and then the word "block" or "process".

Any idea on how to do this welcome.

Regards from Switzerland.
User avatar
palou
Basic User
Basic User
 
Posts: 46
Joined: Fri Dec 17, 2004 12:00 am
Location: Geneva / Switzerland

Re: Label coloring

Postby Mofi » Mon Feb 27, 2006 11:15 am

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^}"
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4049
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Label coloring

Postby palou » Mon Feb 27, 2006 11:58 am

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.
User avatar
palou
Basic User
Basic User
 
Posts: 46
Joined: Fri Dec 17, 2004 12:00 am
Location: Geneva / Switzerland

Re: Label coloring

Postby palou » Mon Feb 27, 2006 12:15 pm

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.
User avatar
palou
Basic User
Basic User
 
Posts: 46
Joined: Fri Dec 17, 2004 12:00 am
Location: Geneva / Switzerland

Re: Label coloring

Postby vis153 » Thu Apr 25, 2013 9:46 am

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.
vis153
Newbie
 
Posts: 2
Joined: Thu Apr 25, 2013 9:35 am

Re: Label coloring

Postby Mofi » Thu Apr 25, 2013 12:39 pm

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 like must be at beginning of a line, consist only of letters, digits and underscores and end with a colon into account. 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.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4049
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Label coloring

Postby vis153 » Fri Apr 26, 2013 4:30 am

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!
vis153
Newbie
 
Posts: 2
Joined: Thu Apr 25, 2013 9:35 am


Return to Syntax Highlighting