User to user discussion and support for UltraEdit, UEStudio, UltraCompare, and other IDM applications.

Syntax highlighting, code folding, brace matching, code indenting, and function list
7 posts Page 1 of 1
Just downloaded and installed UE Trying it out, noticed this:
If I, in the function list, double click a function, the cursor does not jump to the functions first line.
The cursor will instead be positioned in the vicinity of the functions first line, but never exactly on it.
Sometimes the cursor will even be positioned outside of the target function.
Anyone else seen this?
We need more information to help on this issue:

  1. Which syntax highlighting is active?
    This information is displayed in status bar at bottom of UltraEdit main window in field left to last modification date of active file.
  2. What are the regular expressions defined in the syntax highlighting file used for active file which are used to find the strings for the function list?
    Open Advanced - Configuration - Editor Display - Syntax Highlighting, click on button Open right of the already selected wordfile used for active file and close configuration dialog with button Cancel. Copy and paste all lines from top of file starting with /Function String or the block starting with first /TGBegin and ending with last /TGEnd into your next post.
  3. What is the encoding of the file (ANSI/UTF-8/UTF-16) and the type of line termination (DOS/UNIX/MAC)?
    Encoding and line termination type for active file are both displayed also in status bar at bottom.
  4. Please post a block from active file where positioning the caret on double click in function list is not correct. But verify first if positioning is also not working when this block only is stored in a new file of same type (file extension, encoding, line termination type) after 3 empty lines.
Best regards from Austria
Hi Mofi!

Thanks for your response. I have attached a zip with the relevant files. I will answer your 4 points, in brief:

  1. The wordfile is the attached RapidHMv21.uew. For the ABB industrial robot programming language Rapid. The wordfile is a bit of a homebrew, but has served me very well for many years. Up till now.
  2. Please see the wordfile attached (removed, getter better one below).
  3. Line terminations DOS. Encoding 1252 (ANSI - Latin I). Please check out the attached target file LTool.mod (also removed).
  4. See picture below.


The UltraEdit regular expressions for the function list are really not good in your wordfile. %+ is invalid as a multiplier on non matching anchor for start of line is in any regex engine invalid. [^{ ^}^{LOCAL ^}]+ looks like an OR expression inside a character set definition. That's also not valid and is interpreted completely different than what was the intention.

But you are nevertheless right with what you observed. UltraEdit does not produce the correct output in function list and misplaces the caret on double click even when using valid UltraEdit regular expression search strings. I will analyze that more deeply and report it to IDM support by email.

In the meantime I made a very quick look on RAPID Overview On-line PDF file and reworked your wordfile using Perl regular expressions for the function strings. Those work much better. I created 6 different variations. See the attached ZIP file containing also a readme.txt file with more details.

This first version of the wordfiles was deleted after post below.
Best regards from Austria
Thanks a lot Mofi.

The Rapid manual you found is quite old, from the mid 1990's. The basic structure of the language has not changed much. But identifiers can now have up to 32 characters. I can easily adapt for this in your wordfiles.

But another thing I am not able to fix:
The syntax for a Function declaration is FUNC datatype name.
Okay! It was no problem for me to update the Perl regular expressions in the 6 wordfiles to include datatype on FUNC only and getting the datatype also listed in the function list. See the wordfiles in attached second ZIP file.

By the way: Wordfile 3 and 6 were not working good before at all detected by me on analyzing the issues more deeply for the report I have sent already to IDM support. This second ZIP file contains now really working expressions in wordfile 3 and 6. (Function list looked right with previous wordfile 3 and 6, but caret positioning did not work. This was included in the report, too.)


Best regards from Austria
Yes, your latest wordfile no. 6 works exactly as I want, including caret positioning.
Many thanks!
7 posts Page 1 of 1