使mmm模式在emacs中工作24 [英] Getting mmm-mode to work in emacs 24

查看:135
本文介绍了使mmm模式在emacs中工作24的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图让mmm模式工作,专门用于Rails开发。我已经遵循安装说明,我无法达到特定的混合模式和我正在寻找的特别亮点。最具体的erb文件。这是我的.emacs文件:

I have been trying to get mmm-mode to work, specifically for Rails development. I have followed the install instructions and I can't get to the specific mixed mode and special highlighting I was looking for. Most specifically erb files. Here is my .emacs file:

(custom-set-variables
 '(custom-enabled-themes (quote (zenburn)))
 '(custom-safe-themes (quote ("71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" default)))
 '(show-paren-mode t))
(custom-set-faces
 )

;; File associations.
(setq auto-mode-alist (cons '("\\.builder$" . ruby-mode) auto-mode-alist))

(require 'mmm-auto)
(setq mmm-submode-decoration-level 0)
(mmm-add-group
 'fancy-html
 '((html-erb
    :submode ruby-mode
    :match-face (("<%#" . mmm-comment-submode-face)
                 ("<%=" . mmm-output-submode-face)
                 ("<%"  . mmm-code-submode-face))
    :front "<%[#=]?"
    :back "%>"
    :insert ((?% erb-code       nil @ "<%"  @ " " _ " " @ "%>" @)
             (?# erb-comment    nil @ "<%#" @ " " _ " " @ "%>" @)
             (?= erb-expression nil @ "<%=" @ " " _ " " @ "%>" @)))))

(add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil fancy-html)) 

尽管按照说明顺利的安装过程,我还没有能够突出显示我的erb文件。如果重要的话我正在运行emacs 24。所以我按照下载中的指示。我把文件夹放在我的.emacs.d文件夹中。我可以访问M-x中的mmm模式的东西。我只是不明白我的模式,我找不到任何引用的声明模式。

Despite having a smooth install process following the instructions I have yet to be able to get highlighting to work in my erb files. I am running emacs 24 if that matters. So I followed the directions on in the download. I placed the folder afterwards in my .emacs.d folder. I have access to mmm-mode stuff in M-x. I just don't get highlighting for my modes and I can't find any reference to the declared modes.

PS:旁注我不能让我的zenburn主题坚持,但这是一个不同的主意。

PS: Side note I can't get my zenburn theme to stick but that's a different mater.

编辑:我所指的指示在这个链接和下载中targz附带的INSTALL文件。

The "instructions" I am referring to are at THIS link and the INSTALL file included with the targz in the download.

推荐答案

不幸的是,Emacs没有很好的规范多模式编辑故事。 sanityinc(Steve Purcell)已经为Emacs 24修补了MMM模式: https://github.com/purcell/mmm-mode

Unfortunately Emacs has no good canonical multi-mode editing story. sanityinc (Steve Purcell) has patched up MMM-mode for Emacs 24 here: https://github.com/purcell/mmm-mode

他的配置在这里: https://github.com /purcell/emacs.d

as init-ruby-mode.el init-mmm.el

但它远非理想(无缩进支持,仅突出显示特殊区域。)

but it's far from ideal (no indentation support, only highlight special regions.)

其他已经运行nxhtml。

Other have had luck with nxhtml.

编辑:添加指向sanityinc的配置

add pointer to sanityinc's config

这篇关于使mmm模式在emacs中工作24的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆