Created
April 3, 2017 04:55
-
-
Save db0company/40970d37b8f2e1180f60e2e9fcfd27f7 to your computer and use it in GitHub Desktop.
This file contains 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 characters
(add-to-list 'load-path "~/.emacs.d/installed/") | |
(when (fboundp 'electric-indent-mode) (electric-indent-mode -1)) | |
(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 '("\\.js[x]?\\'" . web-mode)) | |
(add-to-list 'auto-mode-alist '("\\.json\\'" . web-mode)) | |
(setq-default indent-tabs-mode nil) | |
(setq-default web-mode-markup-indent-offset 2) | |
(add-hook 'web-mode | |
(function (lambda () | |
(setq indent-tabs-mode nil | |
tab-width 2 | |
space-width 2)))) | |
(defun my-web-mode-hook () | |
"Hooks for Web mode." | |
(setq web-mode-markup-indent-offset 2) | |
) | |
(add-hook 'web-mode-hook 'my-web-mode-hook) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment