Eliminado web-mode en favor de multi-web-mode.

This commit is contained in:
kj
2020-08-04 01:05:30 -04:00
parent eba7c4b9c7
commit 255736783f
+14 -15
View File
@@ -51,7 +51,7 @@
'(magit-diff-use-overlays nil)
'(package-selected-packages
(quote
(spacemacs-theme flycheck ac-emmet web-mode ac-html markdown-preview-mode multiple-cursors git-gutter powerline ample-zen-theme monokai-theme dracula-theme auto-complete neotree all-the-icons spinner markdown-mode lv ht f evil dash-functional)))
(multi-web-mode spacemacs-theme flycheck ac-emmet markdown-preview-mode multiple-cursors git-gutter powerline ample-zen-theme monokai-theme dracula-theme auto-complete neotree all-the-icons spinner markdown-mode lv ht f evil dash-functional)))
'(pdf-view-midnight-colors (quote ("#b2b2b2" . "#292b2e")))
'(pos-tip-background-color "#FFFACE")
'(pos-tip-foreground-color "#272822")
@@ -137,19 +137,19 @@
(global-set-key (kbd "C-S-d") 'mc/mark-all-like-this) ;Seleccionar todos como el actual
(global-set-key (kbd "C-S-<mouse-1>") 'mc/add-cursor-on-click) ;Añadir cursor con clics (Shift+CTRL+Clic)
(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))
(setq web-mode-css-indent-offset 2
web-mode-code-indent-offset 2
web-mode-sql-indent-offset 2
web-mode-script-padding 2
web-mode-markup-indent-offset 2)
; Cambiar de modos en un archivo que tiene php, html, css y js a la vez.
(require 'multi-web-mode)
(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"))
(multi-web-global-mode 1)
;Habilitar siempre auto-complete-mode en html-mode
(add-hook 'html-mode-hook #'(lambda()
(auto-complete-mode)
))
(powerline-default-theme); Habilitar powerline (esa línea bonita de abajo del editor)
@@ -159,4 +159,3 @@
(setq c-basic-offset 2) ; Cambio los tabs por 2 espacios (PSR recomienda 4, pero editores como atom y VScode al momento de que configuro esto usan 2 y prefiero mantener esa compatibilidad entre editores)
; (web-mode) ;Pongo PHP siempre en webmode en caso de tener php-mode
))