Commit e89d6afe authored by ThorbenQuast's avatar ThorbenQuast
Browse files

editor: extend syntax highlighting and command defaults to .r and .m files

parent 8e1ec62d
......@@ -10,7 +10,8 @@ var CommandLine = Emitter.extend({
"pdflatex %file": ["tex"],
"gcc %file -o %file.out && ./%file.out": ["c"],
"g++ %file -o %file.out && ./%file.out": ["cc", "cp", "cxx", "cpp", "CPP", "c++", "C"],
"R -f %file": ["R"]
"R -f %file": ["R"],
"octave -q -f %file": ["m"]
};
this.commandline = null;
......
......@@ -523,6 +523,12 @@ var CodeEditor = Emitter.extend({
case "py":
mode += "python";
break;
case "r":
mode += "r";
break;
case "m":
mode += "matlab";
break;
default:
mode += "text";
break;
......
......@@ -29,7 +29,7 @@ var CodeEditorExtension = vispa.Extension.extend({
// register to listen to certain file extensions
this.fileExtensions = ["bsc", "c", "cc", "conf", "cpp", "csh", "css", "diff", "f", "f70",
"f90", "f95", "f03", "h", "hh", "hpp", "html", "ini", "java", "js", "less", "log", "json",
"md", "orig", "php", "py", "R", "rb", "sh", "tex", "txt", "xml", "yml", "yaml", "zsh"
"m","md", "orig", "php", "py", "R", "rb", "sh", "tex", "txt", "xml", "yml", "yaml", "zsh"
];
$.each(this.fileExtensions, function(i, key) {
self.addFileHandler(key, function(workspaceId, path) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment