Here's how to install "multi web mode", which will switch the Emacs mode depending on what type of code is being edited.
cd ~/.emacs.d/
git clone git@github.com:fgallina/multi-web-mode.git
Add this to your ~/.emacs.d/init.el:
(when t
(add-to-list 'load-path "~/.emacs.d/multi-web-mode/")
(require 'multi-web-mode)
(setq mweb-default-major-mode 'html-mode)
(setq mweb-tags '((php-mode "<\\?php\\|<\\? \\|<\\?=" "\\?>")
(js-mode "")
(css-mode "")))
(setq mweb-filename-extensions '("php" "htm" "html" "ctp" "phtml" "php4" "php5"))
(multi-web-global-mode 1))
Exit emacs, then fire it up again to enable the mode.
No comments:
Post a Comment