Closed kjnez closed 7 months ago
do you use TAB as indentation char ?
Yes, my indent-tabs-mode
is t
.
Also, I don't know how exactly this unwanted behavior is triggered but one way can be this (| is the cursor):
<div>
...
</div>
<|
<div>
...
</div>
If I hit "d", it becomes
<div>
...
</div>
<d |
<div>
...
</div>
web-mode does not handle well indentation with tabs. Do not hesitate to provide a patch for this
For anyone running into the same problem, this can be partially solved by
(add-hook 'web-mode-hook (lambda () (indent-tabs-mode -1)))
When I edit HTML files (with django template), I find that I have to use
web-mode-dom-normalize
every so often. If I don't do that, the following will happen (| denotes the cursor):After hitting ">", it becomes this
Note the space between ">" and the cursor. If I hit backspace delete, it becomes this
Note that the space still exists. And if I hit ">" again, it becomes this
Basically, the space will always be there and cannot be deleted. Using
web-mode-dom-normalize
solves this problem but I doubt this is the desired behavior.Sometimes there will be the space regardless of whether I'm near the end of the
div
.