! Syntax Highlighting Patterns for Matlab ! ! Important: please spend some minutes to read the comments of the file. ! ------------------------------------------------------------------------------ ! ! Highlighting Patterns for Matlab ! ! In NEdit Version 5.0.1 and beyond, load this pattern by starting nedit with: ! ! nedit -import ! ! Then, check that the patterns were loaded correctly, and choose Save Defaults ! from the Preferences menu. The new patterns will now be incorporated into ! your own .nedit file, so the next time you start NEdit, you will no longer ! need to use -import. ! ! In version 5.0, without -import, you must edit your .nedit file by hand and ! add the contents of each resource below to the corresponding list in your ! .nedit file. Be sure to separate new entries with \n, and continue resource ! strings by escaping all newlines within a resource value with \ (backslash), ! leaving only the last line of the resource value not ending in \. ! ! ------------------------------------------------------------------------------ ! Here above between dotted lines is the usual introduction to the NEdit ! patterns files; whereas here below contains something I think worth mentioned ! (some can be found in the Help, though): ! ! 1) This Matlab pattern may still contain some imperfections, so if you have ! any suggestion or any problem with it, please send an email to me at ! seak@drfc.cad.cea.fr (valid uptil December 1999). ! ! 2) A pattern file contains informations about how to recognize patterns. ! It is not related to how colors and styles are defined, even though it does ! define which styles to use. If a particular color and style doesn't suit you, ! and you want to have a different one, change it in Preference > Default ! Settings > Syntax Highlighting > Text Drawing Styles. You might have to take ! a look at ... > Syntax Highlighting > Recognition Patterns first in order to ! know which style is used for which pattern. ! ! 3) If you want to change associated style for parentheses, change style for ! both "Paren transposed" and "Parentheses". The same applies to brackets and ! braces. If you don't like or need any parentheses, brackets and braces to ! be colored, DON'T delete their patterns. Instead, change their style to ! "Plain" text. ! ! 4) The most obvious one: you'd better not change the patterns order. ! ! Seak, Teng-Fong 1998-10-21 ! nedit.highlightPatterns: \ Matlab:1:0{\n\ Comment:"%":"$"::Comment::\n\ Keyword:"<(for|while|if|then|else|elseif|end|return|break|clear|function|global)>":::Keyword::\n\ Single quote:"'":"'"::String::\n\ Transpose:"[a-zA-Z0-9_.]('+)":::Plain::\n\ Paren transposed:"[)]('+)":::Keyword::\n\ Paren transp close:"\\1":""::Plain:Paren transposed:C\n\ Parentheses:"[()]":::Keyword::\n\ Brackets transposed:"[]]('+)":::Text Key1::\n\ Brack transp close:"\\1":""::Plain:Brackets transposed:C\n\ Brackets:"[][]":::Text Key1::\n\ Braces transposed:"[}]('+)":::Text Arg1::\n\ Braces transp close:"\\1":""::Plain:Braces transposed:C\n\ Braces:"[}{]":::Text Arg1::\n\ String:"^'":"'"::String::D\n\ Numeric const:"<((([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)>":::Numeric Const::\n\ Three periods to end:"(\\.\\.\\.)":"$"::Comment::\n\ Three periods:"\\1":""::Keyword:Three periods to end:C\n\ Shell command:"!":"$"::String1::\n\ Comment in shell cmd:"%":"$"::Comment:Shell command:\n\ Relational operators:"==|~=|\\<=|\\>=|\\<|\\>":::Text Arg1::\n\ Wrong logical ops:"&&|\\|\\|":::Plain::\n\ Logical operators:"~|&|\\|":::Text Arg2::\n\ } nedit.languageModes: Matlab:.m::::::