[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

.rhtml syntax and win32 editor

JZ

6/28/2005 9:34:00 PM

Do you know any editor/ide for win32 which can recognize .rhtml syntax? I
like Eclipse but its Ruby plugin understand only .rb files. Quite good
effect has SciTe with PHP settings choosen for rhtml but it is not perfect.

--
JZ
2 Answers

Belorion

6/28/2005 9:44:00 PM

0

On 6/28/05, JZ <abuse@tpnet.pl> wrote:
> Do you know any editor/ide for win32 which can recognize .rhtml syntax? I
> like Eclipse but its Ruby plugin understand only .rb files. Quite good
> effect has SciTe with PHP settings choosen for rhtml but it is not perfect.

jEdit does not too shabby. Especially when you throw in the Ruby
plugin (doesn't change syntax highlighting, but still useful!)

http://www....
http://www....ruby/

Matt


Vincent Foley

6/28/2005 11:11:00 PM

0

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 "<f8>") 'mmm-parse-buffer)
(setq mmm-classes '(erb-code))
(mmm-mode-on)))
(add-to-list 'auto-mode-alist '("\\.rhtml$" . html-mode))