leafOfTree/vim-vue-plugin

There are unexpected indentation problems.

roket1428 opened this issue · 9 comments

As you can see on this image, there are unexpected indentation problems.
I use gg=G to auto-indent file.

Thank you for this bug report.
XML indentation method is used for common tag indentation, which doesn't handle empty tags like <input > correctly( but <input /> I am used to writing ).

So <input />, <img /> ... self closed tags can get correct indentation for the time being. And I'll see if XML can handle empty tags later.

My solution is only using HTML indentation for empty tags. Now it's ok to use both <input> and <input />.

I'll not close this issue until I have enough experience with your plugin. But for now, it is working like a charm, good job man.

There are still indentation problems. :)

Yes, there are some indentation problems with /> followed by a blank line. Now it should work.

I haven't used IRC before. But I heard about freenode and have used Gitter. Maybe we can discuss issues in this Gitter room if you encounter them later.

https://gitter.im/vim-vue-plugin/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link

Haha, I found another indentation error. :P
If you add html comments that include tags in somewhere, indentation gets broken.

Yes, indentation error occurs with <input> inside comments. It seems that mixed use of XML and HTML indentation causes some trouble. So now I only use XML indentation and patch it to indent as expected.

Could you check your gitter out? I wanna show something.

Sure.