Here's a basic, buggy HTML tag auto-completer for vis. It was inspired by this answer on Stack Overflow.
- Complete an arbitrary tag with
>
and replace the cursor in the middle of the tag - with a second closing bracket (typing another
>
—"double-closing"), push the closing tag onto the next line and indent
- [x]
The cursor isn't placed correctly if a tag is completed on the first line of a brand new file - [x]
It doesn't know anything about self-closing tags - [ ] If you add some properties to the tag before closing it, the properties will be included in the closing tag, too
- [x]
Double-closing tags only places the cursor correctly if the line isn't already indented - [x]
It doesn't check the syntax of the file to see if it's an html file—it's just always on - [ ] Hitting backspace doesn't delete the tag if it was just closed
- [ ] Using this in a macro may cause unexpected results
- [ ] And more, I'm sure
I created this because I really like the vis editor and I want to contribute what I can to its development, however small that contribution may be. I also write HTML most of the time, so I wanted to make something that would save me a little typing. I plan to fix some of the bugs listed above to make it better to use in real coding.