【发布时间】:2012-04-05 03:42:31
【问题描述】:
我下载了 nxhtml 并解压缩。然后我把它放在我的 .emacs 文件中。
(add-to-list 'load-path "~/nxhtml/util")
(require 'mumamo-fun)
(setq mumamo-chunk-coloring 'submode-colored)
(add-to-list 'auto-mode-alist '("\\.rhtml\\'" . eruby-nxhtml-mumamo-mode))
(add-to-list 'auto-mode-alist '("\\.html\\.erb\\'" . eruby-nxhtml-mumamo-mode))
当我打开一个 .html.erb 文件时,它没有设置正确的模式(因此语法突出显示不正确)。我知道 require 语句运行正确 b/c 我可以手动将 aquamacs 设置为 eruby-nxhtml-mumamo-mode ,如果我注释掉 require 行,我什至无法切换到该模式。我什至尝试将 eruby...-mode 替换为其他模式,例如 c++-mode 和其他我知道可以工作但也不起作用的模式。
那么我的正则表达式有问题吗?我不确定。任何帮助将不胜感激。
【问题讨论】:
-
我看不出你的代码有什么问题,并且在实验上它对我有用(指定了不同的模式)。当你说你没有进入正确的模式时,你最终会进入哪种模式?也许另一个映射优先。
标签: ruby-on-rails emacs nxhtml