Skip to content

Instantly share code, notes, and snippets.

@db0company db0company/react.el
Created Apr 3, 2017

Embed
What would you like to do?
(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
You can’t perform that action at this time.