Syntax highlighting for Matlab
Posted: Tue Feb 24, 2004 9:18 pm
Matlab uses the same character as string separator as for the transpose operator. This causes a problem with syntax highlighting. For example:
r = [sin(phi)' cos(phi)'];
will cause the characters between the apostrophes to be colored as strings. The only way around this seems to be turn off string coloration alltogether.
My proposal is to allow sequences of characters to trigger string coloration. For example (' and ,' would indicate the start of a string but )' would not. This way I think it would be possible to distinguish the two uses of the apostrophe.
r = [sin(phi)' cos(phi)'];
will cause the characters between the apostrophes to be colored as strings. The only way around this seems to be turn off string coloration alltogether.
My proposal is to allow sequences of characters to trigger string coloration. For example (' and ,' would indicate the start of a string but )' would not. This way I think it would be possible to distinguish the two uses of the apostrophe.