📄 shbrushmatlabm.js
字号:
dp.sh.Brushes.CMatlabM = function()
{
var keywords = 'for if end function break case catch classdef continue' +
' default otherwise else elseif global' +
'parfor switch return true flase while try';
this.regexList = [
// There's a slight problem with matching single line comments and figuring out
// a difference between // and ///. Using lookahead and lookbehind solves the
// problem, unfortunately JavaScript doesn't support lookbehind. So I'm at a
// loss how to translate that regular expression to JavaScript compatible one.
// { regex: new RegExp('(?<!/)//(?!/).*$|(?<!/)////(?!/).*$|/\\*[^\\*]*(.)*?\\*/', 'gm'), css: 'comment' }, // one line comments starting with anything BUT '///' and multiline comments
// { regex: new RegExp('(?<!/)///(?!/).*$', 'gm'), css: 'comments' }, // XML comments starting with ///
{ regex: new RegExp('%.*$', 'gm'), css: 'comment' }, // one line comments
{ regex: new RegExp('%{(?!\\$)[\\s\\S]*?}%', 'gm'), css: 'comment' }, // multiline comments %{ }%
{ regex: dp.sh.RegexLib.DoubleQuotedString, css: 'string' }, // strings
{ regex: dp.sh.RegexLib.SingleQuotedString, css: 'string' }, // strings
{ regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } // Matlab M keyword
];
this.CssClass = 'dp-m';
//this.Style = '.dp-m .vars { color: #d00; }';
}
dp.sh.Brushes.CMatlabM.prototype = new dp.sh.Highlighter();
dp.sh.Brushes.CMatlabM.Aliases = ['m'];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -