Matlab Language Module
Version 2.8
2022-07-15
Andrew J. Miller
ajmiller@psu.edu

To install, double click the Matlab.bblm plugin bundle and BBEdit should attempt to open it and install it to the correct location. If not, right-click the Matlab.bblm plugin and choose "Open With" and select BBEdit. This version has been signed by Bare Bones Software, so it should install without any macOS warning about untrusted developers. Thanks to Rich Siegel at Bare Bones for handling the build and debugging a few issues.

In versions prior to 2.8, if this is the first time the plugin has been installed, macOS may prevent it from opening because the plugin is not notarized with Apple. You can allow the file to open from the "General" tab of the "Security & Privacy "control panel in macOS System Preferences. Then try opening the plugin again. If the plugin has been installed before, BBEdit may prompt to replace the existing plugin with the new one. 
 
To install manually, quit BBEdit and place the module Matlab.bblm in
/Library/Application Support/BBEdit/Language Modules/
or
~/Library/Application Support/BBEdit/Language Modules/
or 
~/Library/Containers/BBEdit/Data/Library/Application Support/BBEdit/Language Modules
depending on where your BBEdit Application Support folder is located. Remove any previous versions of the Matlab plug-in and restart BBEdit. The same instructions apply equally to TextWrangler, but install in the TextWrangler/Language Modules/ folder in Application Support. 

Some usage tips:
You may have to remove the .m suffix mapping for Objective-C to get the module to work properly, but as long as the Matlab plugin is newer than the Obj-C plugin provided by BareBones, the Matlab plugin takes precedence.

Supported systems:
This version was built with Xcode 12.4 and is known to work with BBEdit 14.5 on Intel Macs and should work on Apple Silicon Macs. It should work with BBEdit 11, 12 and 13, but I do not test compatibility with older versions. Older versions of BBEdit and Text Wrangler do not work. You may still download version 2.3 for use with older versions of BBEdit and TextWrangler.

Version history:

New in version 2.8:
No new features. Some updates for compatibility with BBEdit's Language Module SDK header files.
This version is signed by Bare Bones Software to make installation easier for users.

New in version 2.7:
No new features. Rebuilt as universal binary. 

New in version 2.6:
No new features. Compatibility update for future BBEdit 12 updates.

New in version 2.5:
No new features. Compatibility update for BBEdit 11.6+

New in version 2.4:
Two language specific colors have been added: Incomplete Strings and Shell Interpreter Commands. Code folding for functions has been added. Default comment characters are set by the plugin.

New in version 2.3:
Added support for new keywords 'parfor', 'classdef', 'events', 'properties', 'methods'. 

New in version 2.2:
Support for block comments. In recent versions of MATLAB, a block comment is started with '%{' and ended with '%}'. The delimiters must be placed on blank lines, or else they behave as ordinary line comments. Block comments may be nested.

New in version 2.1:
Built as a universal binary. No other changes.

New in version 2.0:
Continuation characters '...' are colored the same as keywords, and all text following '...' is colored the same as comments to the end of the line.

System commands that follow an '!' are now colored. This color may be set using the Shell Interpreter Command button under Matlab in the 'Text Colors' preference panel.

The color of incomplete character strings can be set using the Incomplete Strings button under Matlab in the 'Text Colors' preference panel.

Also, keywords that are used as members of structures are now not colored as keywords. For example a structure might have a member called 'function'. It would be normal for references to this member such as my_struct.function to not have any coloration on the word 'function'. Also, when 'end' is used as an index to an array such as my_array(1:end) it will now not be colored. In fact, keywords will only be colored if they appear in their proper context as matlab flow control statements.

The function popup menu will now position the cursor at the start of any comments that precede the start of the function definition.

Folding of functions is supported. The whole function body collapses to just the first line that declares the function.

Newer versions of matlab allow functions to be nested if they are terminated by 'end' statements. The function popup menu indents nested function names accordingly. Nested functions may also be folded.


