I am writing some html/vue code with vim, but I found the auto-indent functionality not working as expected, especially with nested tags and attributes broken into multiple lines.
I read the coding standard agreed upon for long html tags, and I reason it would be nice if vim can support such indentation style. I found multiple similar questions asked like this, but they don't give satisfactory answers. I have also tried the html5 plugin for vim, but it doesn't seem to help much.
For example, I would like vim to indent like following:
<template>
<my-tag
attr1
attr2
attr3>
<my-sub-tag
attr1
attr2
attr3>
</my-sub-tag>
</my-tag>
</template>
But currently, when I press gg=G, it indents to something like this:
<template>
<my-tag
attr1
attr2
attr3>
<my-sub-tag
attr1
attr2
attr3>
</my-sub-tag>
</my-tag>
</template>
Is there a relatively quick way to fix it (like a nice plugin), or is it not yet a primary concern for vim?