Unity Javascript的Emacs模式

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模式,现在处于可以与社区共享的状态:)。

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!

它还为函数声明(如果还有其他决定),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
;; emacs的UnityJS模式
(autoload ‘unityjs-mode “unityjs-mode” “Major mode for editing Unity script code.” t)
(自动加载'unityjs-mode“ unityjs-mode”“用于编辑Unity脚本代码的主要模式。” t)
(require ‘unityjs-mode)
(需要'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 ;).

;; 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/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值