Will automatically add closing tags when you type > to complete the opening tag, in HTML, XML and Markdown files.
This is forked from the Auto Close HTML package which is no longer being maintained.
In settings, click the "Install" tab and search for "autoclose-html-plus".
apm install autoclose-html-plus
Under normal circumstances ending tags will be inserted on the same line for inline elements, e.g.,
or two lines down with indentation for block elements, e.g.,
You can use the Force Inline and Force Block options to override this. A single undo after autoclosing a block element will put the closing tag back on the same line, i.e.,
<div>|</div>. A second undo will remove the closing tag.
If you find a bug, please feel free to file an issue, and/or try fixing it yourself and submitting a PR.
Elements in this comma delimited list will render their closing tags on the same line, even if they are block by default. You can set this to
* to force all closing tags to render inline.
Elements in this comma delimited list will render their closing tags after a tabbed line, even if they are inline by default. A value of
* for Force Inline overrides all values in Force Block.
Elements in this comma delimited list should not render a closing tag.
Will convert elements in Never Close list from
Elements that aren't standard HTML tags (e.g., custom XML tags) will be made block tags by default.
Enables the old style of completion detection using buffer events rather than keybindings. Non-QWERTY keyboards might not correctly fire events when > is pressed and/or fire events for entirely different keys. Please note that this mode is buggy (i.e. can complete after undo) and may not be compatible with new features and bug fixes in future releases, post-0.22.0. If/when the core issues behind keybindings not reporting correctly on international keyboards is solved this option may be removed.
<is present and the line is less than 10 below the zeroth line (thanks to UziTech)
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.