Syntax highlighting "wordfile" for UltraEdit & MatLab
Updated 22 Oct 2015
Revision of the version inspired by Jason Breslau, through inspection of the list of special words from http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/funcalpha.html which however also includes subjects: these words have been removed, all I hope.
Functions have been distinguished from statements via my glances at usage in the supplied help system, thus "plot" is more like a statement than a function even though it has parameters and can deliver a result. Not that I'm familiar with all usages, nor does it help that function cellstr is not found via the help's index even though it is between cellplot and cgs which are. If this distinction is of no interest, both groupings can be assigned the same colour.
I am not familiar with the "obj" and "handle" style usages and there is no attempt to include the additional special words of additional MatLab packages such as the statistic toolbox.
As per A.J.Johnston, there are Indent/UnIndent strings, with further details suggested by maryhit to enable the "folding" of blocks, for example if ... end. Unfortunately, the corresponding folding of block comments evades my attempts.
Since Matlab ignores the " character and uses an apostrophe to mark strings as well as array transposition, the latter caused difficulty with strings apparently extending across many lines until the next odd apostrophe. Jeff Mattice suggested adding the special incantation DisableMLS but on noticing that UltraEdit now recognises the word MATLAB_LANG, a trial showed that the problem went away. I am not at all clear on what other details this might affect.
Nicky McLean (2023). Syntax highlighting "wordfile" for UltraEdit & MatLab (https://www.mathworks.com/matlabcentral/fileexchange/8550-syntax-highlighting-wordfile-for-ultraedit-matlab), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired by: MATLAB 6 Wordfile for UltraEdit®
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Re-order the various keywords according to UltraEdit's rules, via the wordfile inspection and correction UE macro "SyntaxTools" files provided via UE's collection of user-submitted files.
Belatedly noticed that Inf is not recognised. Apparently an "I..." keyword must not appear amongst "i..." keywords, but after, and on its own line.
Added an entry per Jesse Hopkins to separate Array(end) usage from if ... end;
A fuller list of special words (based on the list from MathWorks.com), plus improved recognition of syntax and of block folding.