Created
January 11, 2017 06:53
-
-
Save letuananh/1fffac24e1d0a76892d39d0509a8c7d4 to your computer and use it in GitHub Desktop.
Revisions
-
letuananh created this gist
Jan 11, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ ;; download web-mode.el from http://web-mode.org/ and save it to ~/.emacs.d/custom-mode ;; (You may need to create that directory) ;; Add these following lines to ~/.emacs (add-to-list 'load-path "~/.emacs.d/custom-mode") (require 'web-mode) (add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) ;; Indentation for web-mode.el (setq web-mode-markup-indent-offset 2) (setq web-mode-css-indent-offset 2) (setq web-mode-code-indent-offset 2) ;; [3] Now restart Emacs, edit an HTML file and then M-x RET web-mode