]> source.dussan.org Git - nextcloud-server.git/commitdiff
Added all the remaining extensions to filetypes
authorFlorian Jacob <fjacob@lavabit.com>
Tue, 4 Oct 2011 22:23:16 +0000 (00:23 +0200)
committerFlorian Jacob <fjacob@lavabit.com>
Tue, 4 Oct 2011 22:23:16 +0000 (00:23 +0200)
mapping which ace-editor supports.

apps/files_texteditor/js/editor.js

index 8a23062748a335eef750575da90e165ac1c4234b..1eb21b8d9eedf3facc6dc019c23c791b15167895 100644 (file)
@@ -12,14 +12,30 @@ function setSyntaxMode(ext){
        // Loads the syntax mode files and tells the editor
        var filetype = new Array();
        // Todo finish these
-       filetype["php"] = "php";
-       filetype["html"] = "html";
-       filetype["rb"] = "ruby";
+    filetype["h"] = "c_cpp";
+    filetype["c"] = "c_cpp";
+    filetype["cpp"] = "c_cpp";
+    filetype["clj"] = "clojure";
+    filetype["coffee"] = "coffee"; // coffescript can be compiled to javascript
+    filetype["cs"] = "csharp";
        filetype["css"] = "css";
+    filetype["groovy"] = "groovy";
+       filetype["html"] = "html";
+    filetype["java"] = "java";
+       filetype["js"] = "javascript";
+    filetype["json"] = "json";
+    filetype["ml"] = "ocaml";
+    filetype["mli"] = "ocaml";
        filetype["pl"] = "perl";
+       filetype["php"] = "php";
        filetype["py"] = "python";
+       filetype["rb"] = "ruby";
+    filetype["scad"] = "scad"; // seems to be something like 3d model files printed with e.g. reprap
+    filetype["scala"] = "scala";
+    filetype["scss"] = "scss"; // "sassy css"
+    filetype["svg"] = "svg";
+    filetype["textile"] = "textile"; // related to markdown
        filetype["xml"] = "xml";
-       filetype["js"] = "javascript";
 
        if(filetype[ext]!=null){
                // Then it must be in the array, so load the custom syntax mode
@@ -166,4 +182,4 @@ $(window).resize(function() {
 
 $(document).ready(function() {
        bindControlEvents();    
-});
\ No newline at end of file
+});