Emacs语法¶
Emacs的MapServer模式¶
Emacs有一个MapServer模式,可从以下网址获得: https://github.com/AxxL/mapserver-emacs-mode 此模式允许在Emacs中打开MapServer Mapfile 时突出显示语法和进行代码缩进。
请直接通过Github或通过MapServer用户列表报告问题。还有一些问题。
安装¶
您可以在以下位置获取必要的文件: https://github.com/AxxL/mapserver-emacs-mode/blob/master/mapserver-mode.el
放入:$home/.emacs.d/lisp/
您需要在$home/.emacs.d/init.el中添加以下行
(自动加载“mapserver模式”mapserver模式“编辑umn mapserver文件的模式。”t)(添加到列表“自动模式列表”(“auto-mode alist”)。mapserver模式)
如果您没有指定加载路径,最好现在就指定。把下一行放在另外两行前面。
(添加到“加载路径”~/.emacs.d/lisp列表)
有关Emacs的一些帮助,请访问 Emacs Wiki
背景¶
这个文件是hal-muellers-mapserver模式的一个分支,他几乎宣布 10 years ago at the mapserver-users list . 我只是将关键字和常量更新到最新版本,并稍微调整了正则表达式。
原始文件似乎基于 Mode Tutorial by Scott Andrew Borton . 也见 Sample Major Mode example by Stefan Monnier 如果你想写自己的模式。
结合Yasnipet和自动完成模式,您应该有一个很好的方法来编辑您所喜爱的Emacs环境中的 Mapfile 。