diff --git a/buildroot-v86/board/v86/rootfs_overlay/etc/profile b/buildroot-v86/board/v86/rootfs_overlay/etc/profile index b0ce716..5705800 100644 --- a/buildroot-v86/board/v86/rootfs_overlay/etc/profile +++ b/buildroot-v86/board/v86/rootfs_overlay/etc/profile @@ -32,7 +32,7 @@ help_tips(){ echo "" echo 'TIPS' echo '----' - echo 'text editors ' "type ' '" + echo 'text editors ' "type ' '" echo 'programming languages ' "type 'ls ~/bin/helloworld*'" echo 'run 64bit linux app ' "type 'blink '" echo 'paste text ' "ctrl/cmd+shift+v'" diff --git a/buildroot-v86/board/v86/rootfs_overlay/root/opt/codemirror/codemirror.js b/buildroot-v86/board/v86/rootfs_overlay/root/opt/codemirror/codemirror.js index 25747ad..d5eeda9 100755 --- a/buildroot-v86/board/v86/rootfs_overlay/root/opt/codemirror/codemirror.js +++ b/buildroot-v86/board/v86/rootfs_overlay/root/opt/codemirror/codemirror.js @@ -66,7 +66,13 @@ AFRAME.registerComponent('codemirror', { this.el.setAttribute("window", `title: codemirror; uid: ${this.el.dom.id}; attach: #overlay; dom: #${this.el.dom.id}; width: ${this.data.width}px; height: ${this.data.height}px`) this.editor = CodeMirror( this.el.dom, { value, - mode: "htmlmixed", + mode: this.data.file.match(/\.js$/) ? "text/javascript" : + this.data.file.match(/\.css$/) ? "text/css" : + this.data.file.match(/\.html$/) ? "htmlmixed" : + this.data.file.match(/\.md$/) ? "markdown" : + this.data.file.match(/\.py$/) ? "python" : + this.data.file.match(/\.lua$/) ? "lua" : + "text/javascript", lineNumbers: true, styleActiveLine: true, matchBrackets: true, @@ -198,6 +204,9 @@ AFRAME.utils.require({ cmxml: "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.35.0/mode/xml/xml.js", cmjavascript: "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.35.0/mode/javascript/javascript.js", cmcss: "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.35.0/mode/css/css.js", + cmlua: "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.35.0/mode/lua/lua.js", + cmpython: "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.35.0/mode/python/python.js", + cmmarkdown: "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.35.0/mode/markdown/markdown.js", highlight: "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.35.0/mode/htmlmixed/htmlmixed.js", }) ) diff --git a/dist/v86-linux.iso b/dist/v86-linux.iso index 5a3e160..b8a0389 100644 Binary files a/dist/v86-linux.iso and b/dist/v86-linux.iso differ