HTML, CSSをemacsで編集するようにした。

HTML,CSSemacsで編集するようにした。

いろいろモードがあるけど、html-helper-modeを使うことにした。
404 Not Found から,

  • html-helper-mode.el
  • tempo.el

をダウンロードして、emacs lisp用のフォルダに置いておく。
自分の場合はDropboximacとmacbookproで設定を同期しているため、~/Dropbox/.emacs.d/elisp に置いた。

.emacsに以下を追加

;;-------------------------------------------------------------------------------  
;; 拡張子とモードの対応                                                            
;;-------------------------------------------------------------------------------  
(add-hook 'html-helper-load-hook '(lambda () (require 'html-font)))
(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)
(autoload 'css-mode "css-mode")

(setq auto-mode-alist
      (append
       '(
         ("\\.htm"       . html-helper-mode)
         ("\\.html"      . html-helper-mode)
         ("\\.shtml$"    . html-helper-mode)
         ("\\.php"       . html-helper-mode)
         ("\\.css"       . css-mode)
         ) auto-mode-alist))


(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)


以上で、emacsに関する設定は終わり。