When working with HTML templates in web mode I'm frustrated by the automatic closing of tags. When inside a <div>
I type </
before it fills it in with div>
.
This make copy/pasting from another place into my terminal annoying.
How do I turn off the feature?
To enable this feature:
(setq web-mode-enable-auto-closing t)
And to disable it:
(setq web-mode-enable-auto-closing nil)
Ref: https://github.com/fxbois/web-mode/issues/358
This is controlled by the web-mode-tag-auto-close-style
variable:
Tag auto-close style:
0=no auto-closing
1=auto-close with </
2=auto-close with > and </.
The default value is 1
. Disable automatic tag closing completely with
(eval-after-load "web-mode"
'(setq web-mode-tag-auto-close-style 0))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With