Next: , Previous: Rhtml Setup, Up: Rhtml Setup


2.2.1 nXhtml-Mode

nXhtml-Mode is a package for web development with Emacs. For more information see http://www.emacswiki.org/cgi-bin/wiki/NxhtmlMode#toc1.

To use nXhtml-Mode mode download it from http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html. Then save the resulting directory into your elisp directory and add the following to your Emacs init file (replacing “nxml-directory” with the name of your downloaded nxml directory).

     ;;; nxml (HTML ERB template support)
     (load "~/path/to/your/elisp/nxml-directory/autostart.el")
     
     (setq
      nxhtml-global-minor-mode t
      mumamo-chunk-coloring 'submode-colored
      nxhtml-skip-welcome t
      indent-region-mode t
      rng-nxml-auto-validate-flag nil
      nxml-degraded t)
     (add-to-list 'auto-mode-alist '("\\.html\\.erb\\'" . eruby-nxhtml-mumamo))