Closed baopham closed 10 years ago
Normally, the re-indentation is triggered via indentkeys
:
A list of keys that, when typed in Insert mode, cause reindenting of
the current line. Only happens if 'indentexpr' isn't empty.
The format is identical to 'cinkeys', see |indentkeys-format|.
See |C-indenting| and |indent-expression|.
When delimitMate inserts the closing ">" automatically, this appears to get skipped (even when you re-type over the closing >
).
FWIW, you can close a tag using <C-x>/
with ragtag: https://github.com/tpope/vim-ragtag/blob/master/doc/ragtag.txt#L37
I see. Thanks for the explanation. I'll probably consider installing ragtag to fix this.
@baopham I came up with a workaround for this particular case: https://github.com/blueyed/delimitMate/commit/df1f32f7729c1535415e87884c60d6010afa1334
You can also just press ==
to trigger indentation of the current line yourself in this situation.
Also, consider using sparkup or something similar to expand HTML markup.
@blueyed cool! I hope it will be merged soon
Usually when I close a tag, Vim auto indents for me:
But when I installed delimitMate, this is what I get:
How do I fix this?