Good job! However, I may have found a bug related to cell code mode.
Consider this piece of code
s1 = 'hello\n';
s2 = 'h\n';
if you run it as a normal script (using F5) everything is fine. But if you run the same code in cell mode (using CTRL+Enter) the result is not what you expected.
This is driving me crazy. I use Matlab R2013b and I use lots of cell code in my scripts, so this is giving me some annoyance.
This is even more complicated since if you try to run the code in debug mode, the problem doesn't show up anymore!
I think the problem is related to the fact that, when using cell code mode, the name of the script file is not passed to the command window (while it appears in the cmd window when using F5) and this in some way reflects in the computation of the current position in the command window.
This is a really good submission, thanks!
I was able to add a predefined style 'Warnings' by
a. adding a 'Warnings' entry in the validStyles cell (after the 'Errors' entry) in function processStyleInfo,
b. changing the subsequent 'elseif mathces < 8' to 'elseif matches < 9' and
c. changing the following 'requestedColor = colors(matches-7,:);' to 'requestedColor = colors(matches-8,:);'.
It seems to be working fine so far.
An interesting exploration into the inner workings of MATLAB, beautifully explained by the author on his blog. I particularly like the innovative use of RGB values as the unique color strings, that allows any color to be displayed. (Great blog too!)