5.0

5.0 | 2 ratings Rate this file 99 downloads (last 30 days) File Size: 6.41 KB File ID: #8550

Syntax highlighting "wordfile" for UltraEdit

by Nicky McLean

 

25 Sep 2005 (Updated 21 May 2009)

Code covered by BSD License  

Insert this file into UltraEdit's file wordfile.uew (previously wordfile.txt)

Download Now | 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.
Zip File Content  
Other Files license.txt,
MatLabWordFile.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
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

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.

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 Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com