smihica / emmet-mode

emmet's support for emacs.
http://www.emacswiki.org/emacs/ZenCoding
Other
726 stars 69 forks source link

Emmet mode not enabled in html, is enabled in css. #74

Open MortalCatalyst opened 8 years ago

MortalCatalyst commented 8 years ago

Using emacs

GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8)
 of 2016-03-13

this is the section I have asked emmet to autoload, commented out smart-tab function i was worried might be interfering but no resolution.

(require 'smart-tab)
(global-smart-tab-mode 1)

;; (defun add-emmet-expand-to-smart-tab-completions ()
;;   ;; Add an entry for current major mode in
;;   ;; `smart-tab-completion-functions-alist' to use
;;   ;; `emmet-expand-line'.
;;   (add-to-list 'smart-tab-completion-functions-alist
;;                (cons major-mode #'emmet-expand-line)))   

;;; emmet
(require 'emmet-mode)
(add-hook 'sgml-mode-hook 'emmet-mode) ;; Auto-start on any markup modes
;;(add-hook 'sgml-mode-hook 'add-emmet-expand-to-smart-tab-completions) 
(add-hook 'css-mode-hook  'emmet-mode) ;; enable Emmet's css abbreviation.
;;(add-hook 'css-mode-hook 'add-emmet-expand-to-smart-tab-completions)

uninstalled and updated to latest emmet via melpa. css mode loads fine.

HaykAvag commented 6 years ago

@MortalCatalyst Have you fixed it? Mine doesn't load when I open html and css files, even tho I added the hooks as suggested in the README. It only works with M-x emmet-mode

keryhu commented 6 years ago

I met this issue have solved?

Randomneo commented 6 years ago

@keryhu try use

(add-hook 'html-mode-hook 'emmet-mode)

and if you want use emmet in php files

(add-hook 'php-mode-hook 'emmet-mode)