Search Unity

Emacs mode for Unity Javascript

January 15, 2010 in Community | 1 min. read
emacs UnityJS
emacs UnityJS
Share

Is this article helpful for you?

Thank you for your feedback!

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 UnityJS

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!

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

To make it work, just add this to your .emacs:

;; UnityJS mode for emacs
(autoload 'unityjs-mode "unityjs-mode" "Major mode for editing Unity script 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)

And make sure to load the path where you are going to store the mode ;).

January 15, 2010 in Community | 1 min. read

Is this article helpful for you?

Thank you for your feedback!