From: Vincent Foley Date: 2005-06-29T08:15:41+09:00 Subject: Re: .rhtml syntax and win32 editor If one of them is your cup of tea, vim and Emacs both do rhtml highlighting. For vim, just get eruby.vim and have an autocommand to load that file when you open a .rhtml file. Emacs is trickier, you gotta use mmm-mode, a mode that allows multiple major mode to be on simultaneously. Here's my config: (require 'mmm-mode) (require 'mmm-auto) (setq mmm-global-mode 'maybe) (setq mmm-submode-decoration-level 2) (set-face-background 'mmm-output-submode-face "DarkSlateGray") (set-face-background 'mmm-code-submode-face "DarkSlateBlue") (set-face-background 'mmm-comment-submode-face "DarkOliveGreen") (mmm-add-classes '((erb-code :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-hook 'html-mode-hook (lambda () (local-set-key (kbd "") 'mmm-parse-buffer) (setq mmm-classes '(erb-code)) (mmm-mode-on))) (add-to-list 'auto-mode-alist '("\\.rhtml$" . html-mode))