Open emerdenny opened 3 years ago
I found this html.vim and loaded it into /.vim/after/ftplugin/html.vim and it hasn't fixed the issue yet (i.e. the autocomplete in .html files doesn't perform desired behavior above)
Another problem is that the HTML tags are often in .js or .jsx files, so the current filetype detection won't catch this issue.
Hm, not able to reproduce this. Can you show the output of echo b:pear_tree_pairs
while editing an HTML file?
In the default ftplugin, input
tags will not auto-close by default, and for other tags I see that adding /
cancels auto-closing
<test> becomes <test></test>
<test type='text'> becomes <test type='text'></test>
<test type='text' /> becomes <test type='text' />
The wildcard behavior for HTML autocomplete is a great feature. I'm running into the issue however that for standalone tags the autocomplete will run unnecessarily. Also, the wildcard is smart enough already to avoid the attributes in the tag, which is perfect, and makes me think there might already be a way to do this.
Example:
<input> --completes to--> <input></input>
(great)<input type='text'> --completes to--> <input type='text'></input>
(great)<input type='text' /> --completes to--> <input type='text' /></input>
(unnecessary)<input type='text' /> --completion cancelled--> <input type='text' />
(desired behavior)Any suggestions on a way to detect the trailing / and cancel autocompletion?