As you may have heard before every friday we spend our time working on personal projects.
I have been working on a Unity Javascript mode for Emacs for a few weeks ago and now is in a state that is usable enough to share with the community :).
几周前,我一直在为Emacs开发Unity Javascript模式,现在处于可以与社区共享的状态:)。
As you can see it colors comments (multiline and single line), has support for basic data types, and also supports string coloring.
如您所见,它为注释(多行和单行)着色,支持基本数据类型,还支持字符串着色。
It also colors function declarations, if – else decisions, while and for/foreach loops and most importantly, it colors all the Unity functions supported by the engine!
它还为函数声明(如果还有其他决定),while和for / foreach循环着色,最重要的是,它为引擎支持的所有Unity函数着色!
Feel free to modify it. Also if you do anything interesting that can be added to the mode just let me know!
随时修改它。 另外,如果您做任何有趣的事情都可以添加到该模式中,请告诉我!
If I have time I’ll add a function to open the browser and search the docs for the word where the cursor is positioned. If for some reason you make it before I can, then just contact me and I’ll add it to the mode :).
如果有时间,我将添加一个功能来打开浏览器,并在文档中搜索光标所处的单词。 如果由于某种原因您尽我所能,请与我联系,我将其添加到模式:)。
Anyway, if you, like me, are an emacs addict, you can grab this mode from here: unityjs-mode.el
无论如何,如果您像我一样是emacs上瘾者,则可以从此处获取此模式: unityjs-mode.el
To make it work, just add this to your .emacs:
要使其工作,只需将其添加到您的.emacs中:
;; UnityJS mode for emacs (autoload 'unityjs-mode "unityjs-mode" "Major mode for editing Unity Javascript code." t) (require 'unityjs-mode)
And make sure to load the path where you are going to store the mode ;).
;; UnityJS mode for emacs (autoload 'unityjs-mode "unityjs-mode" "Major mode for editing Unity Javascript code." t) (require 'unityjs-mode)
;; UnityJS mode for emacs (autoload 'unityjs-mode "unityjs-mode" "Major mode for editing Unity Javascript code." t) (require 'unityjs-mode)
并确保加载要存储该模式的路径; )。
翻译自: https://blogs.unity3d.com/2010/01/15/emacs-mode-for-unity-javascript/