web-modeで、タグのオートクローズが効かない場合

ターミナル上のemacsではタグがオートクローズされないのが標準の動作

Autopairing, tag autoclosing does not trigger
This is the normal behavior when you run emacs in a terminal (tty). That’s because in text mode, pasting a long text is like inserting it one character at a time. Thus, the consequences can be bad e.g. many auto closing/pairing instead of one. If you wan’t to force autoclosing, autopairing even in a terminal, add (setq web-mode-enable-auto-closing t) and (setq web-mode-enable-auto-pairing t) in your .emacs 

web-mode.el - html template editing for emacs

init.elに(setq web-mode-enable-auto-closing t) を追加する (setq web-mode-enable-auto-pairing t)

 

オートクローズの振る舞いの設定

;; auto tag closing
;0=no auto-closing
;1=auto-close with </
;2=auto-close with > and </
(setq web-mode-auto-close-style 2)
(setq web-mode-tag-auto-close-style 2)