multiple major mode support for web editing in Emacs

This commit is contained in:
Jesús 2018-11-02 15:52:59 -05:00
parent e28ea4e2df
commit 0479eaa621
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766
3 changed files with 12 additions and 1 deletions

View File

@ -12,7 +12,7 @@
'(ecb-options-version "2.50") '(ecb-options-version "2.50")
'(package-selected-packages '(package-selected-packages
(quote (quote
(rainbow-mode yaml-mode scss-mode sass-mode less-css-mode smarty-mode ac-php php-mode pkgbuild-mode pip-requirements jedi markdown-mode crystal-mode nginx-mode emmet-mode whitespace-cleanup-mode flycheck neotree all-the-icons highlight-indent-guides anzu sml-modeline smart-mode-line-powerline-theme smart-mode-line ecb diminish undo-tree nlinum sublime-themes use-package)))) (multi-web-mode rainbow-mode yaml-mode scss-mode sass-mode less-css-mode smarty-mode ac-php php-mode pkgbuild-mode pip-requirements jedi markdown-mode crystal-mode nginx-mode emmet-mode whitespace-cleanup-mode flycheck neotree all-the-icons highlight-indent-guides anzu sml-modeline smart-mode-line-powerline-theme smart-mode-line ecb diminish undo-tree nlinum sublime-themes use-package))))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.

View File

@ -38,6 +38,7 @@
(require 'init-modeline) (require 'init-modeline)
(require 'init-indent-guides) (require 'init-indent-guides)
(require 'init-icons) (require 'init-icons)
(require 'init-multi-web)
(require 'init-neotree) (require 'init-neotree)
;; Tools ;; Tools
(require 'init-flycheck) (require 'init-flycheck)

10
lisp/init-multi-web.el Normal file
View File

@ -0,0 +1,10 @@
(use-package multi-web-mode
:config
(setq mweb-default-major-mode 'html-mode)
(setq mweb-tags '((php-mode "<\\?php\\|<\\? \\|<\\?=" "\\?>")
(js-mode "<script +\\(type=\"text/javascript\"\\|language=\"javascript\"\\)[^>]*>" "</script>")
(css-mode "<style +type=\"text/css\"[^>]*>" "</style>")))
(setq mweb-filename-extensions '("php" "htm" "html" "ctp" "phtml" "php4" "php5"))
(multi-web-global-mode 1))
(provide 'init-multi-web)