Anybody who have a working .emacs (++) for Ubuntu (or Debian) with the newest emacs-rails (v.0.3). I have especially trouble with getting HTML Mode Snippets to work. - Henrik
on 2006-04-08 22:16
on 2006-04-09 17:34
Henrik Ormåsen wrote: > Anybody who have a working .emacs (++) for Ubuntu (or Debian) with the > newest emacs-rails (v.0.3). I have especially trouble with getting > HTML Mode Snippets to work. I'm on kubuntu, with emacs cvs latest. Rails.el works although I had some troubles with old abbrevs cached in ~/.abbrev_defs. Removing them helped.
on 2006-04-09 18:11
I am using it on Debian Sarge with no problems. My .emacs has the exact code from the wiki. The only problem I am having is with .rhtml syntax highlighting which is ugly...dark foreground with a dark backgrround makes it impossible to read but it is for <% %> section only. I am still trying to figure this out. For now I turn off global lock to edit rhtml files. I'd appreciate hearing about any solutions. -bakki
on 2006-04-09 18:51
This may help some. The first part is just my color scheme, which kind of matches the Ink look on Textmate. The second section is the mmm-mode settings, which define how multi mode gets highlighted (this is the ERB stuff). On mine I have a dark slate blue background with white text. ;; uncomment the next line if you want syntax highlighting (add-hook 'ruby-mode-hook 'turn-on-font-lock) (cond ((fboundp 'global-font-lock-mode) ;; Customize face attributes (setq font-lock-face-attributes ;; Symbol-for-Face Foreground Background Bold Italic Underline '((font-lock-comment-face "Purple") (font-lock-string-face "green") (font-lock-keyword-face "orange red") (font-lock-function-name-face "orange1") (font-lock-variable-name-face "white") (font-lock-type-face "white" "black" "false" "false" "true") (font-lock-reference-face "Purple") )) ;; Load the font-lock package. (require 'font-lock) ;; Maximum colors (setq font-lock-maximum-decoration t) ;; Turn on font-lock in all modes that support it (global-font-lock-mode t))) This is the MMM Mode stuff: (require 'mmm-mode) (require 'mmm-auto) (setq mmm-global-mode 'maybe) (setq mmm-submode-decoration-level 2) (set-face-background 'mmm-output-submode-face "DarkSlateBlue") (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 () (setq mmm-classes '(erb-code)) (mmm-mode-on))) (add-to-list 'auto-mode-alist '("\\.rhtml$" . html-mode)) (global-set-key [f8] 'mmm-parse-buffer)
on 2006-04-10 18:09
Thanks Michael, I'll use your code and experiment with the colors a bit since I prefer a white background. -bakki On 4/9/06, Michael Trier <email@example.com> wrote: > This may help some. The first part is just my color scheme, which <snip>
on 2006-04-11 05:40
Yes, some people have troubles with snippets in html, but only in Emacs 21. There no problems in GNU/Emacs 22. Also some other things working better in Emacs 22. PS: People, please checkout SVN version of Emacs Rails, it is stable enough.