Indent and syntax in vim for custom elements

I am writing an application in Polymer (and I have the same problem with custom angular directives).

For HTML elements like div, spanetc. indentation and highlighting work great in Vim.

For custom directives / elements such as <paper-tabs>this is not the case. The indentation leaves them on the same line, and the selection is broken:

Example of broken indentation

How can I get vim to take all the elements in the early <elementname attribute="value">and treat them like a normal HTML-element, for example <div>.

+4
source share
1 answer

Source: https://habr.com/ru/post/1547086/


All Articles