There is a
matlab5.uew and a
matlab6.uew on
Downloads - Extras - Wordfiles and in
wordfiles Git repository.
First line of
matlab5.uew is okay. First line of
matlab6.uew is
Code: Select all
/L6"Matlab" Nocase MATLAB_LANG Line Comment = % Block Comment On = %{ Block Comment Off = %} String Chars = ' DisableMLS File Extensions = m asv
which of course results also in first line of a block comment being highlighted as line comment because UltraEdit does not look on next characters once beginning of a line or block comment was identified.
(Browser perhaps display the single line as two lines.)
A possible solution is to use for
matlab6.uew as first line
Code: Select all
/L6"Matlab" MATLAB_LANG Nocase Line Comment Num = 2% Block Comment On = %{ Block Comment Off = %} String Chars = ' DisableMLS File Extensions = m asv
So instead of
Line Comment = % there is now
Line Comment Num = 2% and two spaces after percent sign instead of just one space.
With this definition it is possible to get block and line comment highlighting working for MATLAB files in UltraEdit as long as there is always a space after
% being beginning of a line comment which I would strongly recommend for MATLAB files as first character of line and block comment are identical. A space between line/block comment starting string and comment text is in general always good as making the comment easier to read. Exceptions are special comments like for PC-Lint/FlexeLint, PolySpace, Doxygen, ...
There is no other solution than using
Line Comment Num = 2% .
BTW:
case is not a keyword, remove it. There is either keyword
Nocase for being case-insensitive or the language is case-sensitive. And block comment and line comment definitions should be on first line. What you used works although defined wrong, but you better should follow the guidelines for syntax highlighting wordfiles as documented in help of UltraEdit on page
Syntax Highlighting and in sticky topic
template for syntax highlighting language wordfile.