5.0

5.0 | 4 ratings Rate this file 28 Downloads (last 30 days) File Size: 6.42 KB File ID: #8550

Syntax highlighting "wordfile" for UltraEdit & MatLab

by Nicky McLean

 

25 Sep 2005 (Updated 04 Jul 2010)

Unzip and place MatLab.uew as per Advanced> Configuration > Editor Display > Syntax Highlighting

| Watch this File

File Information
Description

   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.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
MATLAB 6 Wordfile for UltraEditĀ®

MATLAB release MATLAB 7.7 (R2008b)
Other requirements Accessory to UltraEdit: syntax highlighting for MatLab programming.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (6)
23 Oct 2006 Unknown User  
21 Aug 2007 Jeff Mattice

I recommend adding DisableMLS to disable mult-line scripts like this:
/L15"MatLab File" case DisableMLS Line Comment = % String Chars = ' File Extensions = m M

Otherwise transpose is treated as a string.

11 Jun 2009 Ken Lin

excellent! thank you

21 Oct 2009 Jesse Hopkins

Thank you for this submission. I added the following line which helped the code-folding not get confused about "end" used an array-index:
/Ignore Fold Strings = "(end" "end)" "end:" ":end" "end+" "+end" "-end" "end-"

this would help in a situation like this:
if 1
 array(end+1) = 2;
end

22 Jun 2010 Pi Ting

excellent!

03 Feb 2011 Akhilesh Khemka

Excellent, works gr8 thanks a lot

Please login to add a comment or rating.
Updates
21 May 2009

A fuller list of special words (based on the list from MathWorks.com), plus improved recognition of syntax and of block folding.

23 Jun 2010

   Added an entry per Jesse Hopkins to separate Array(end) usage from if ... end;
    Newer versions of UE now have one .uew file per language in a nominated directory rather than one multi-language wordfile.

04 Jul 2010

Belatedly noticed that Inf is not recognised. Apparently an "I..." keyword must not appear amongst "i..." keywords, but after, and on its own line.

Tag Activity for this File
Tag Applied By Date/Time
development environment Nicky McLean 22 Oct 2008 08:00:31
syntax Nicky McLean 22 Oct 2008 08:00:31
highlighting Nicky McLean 22 Oct 2008 08:00:31
mfile Nicky McLean 22 Oct 2008 08:00:31
utilities Nicky McLean 22 Oct 2008 08:00:31
ultraedit Nicky McLean 22 May 2009 10:44:25
edit Nicky McLean 22 May 2009 10:44:25
wordfile Nicky McLean 22 May 2009 10:44:25
matlab Nicky McLean 24 Jun 2010 10:26:22

Contact us at files@mathworks.com