autoclose-html-plus

Automates closing of HTML/XML type tags in Atom. Forked from autoclose-html

binaryfunt

191,203

13

Bug Reports

0.27.2

MIT

GitHub

Auto Close HTML+

Build Status APM

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.

Demo

Other packages used in the above screen: Threshold UI, Convergent Syntax, Tool Bar with Flex Tool Bar, and Minimap

Installation

In Atom

In settings, click the "Install" tab and search for "autoclose-html-plus".

Command line

apm install autoclose-html-plus

Usage

Under normal circumstances ending tags will be inserted on the same line for inline elements, e.g.,

<span>|</span>

or two lines down with indentation for block elements, e.g.,

<div>
  |
</div>

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.

Bug Reports and Contributing

If you find a bug, please feel free to file an issue, and/or try fixing it yourself and submitting a PR.

Options

Force Inline

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.

Force Block

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.

Never Close

Elements in this comma delimited list should not render a closing tag.

Make Never Close Elements Self Closing

Will convert elements in Never Close list from <tag> to <tag />

Make Unrecognized Elements Block Tags

Elements that aren't standard HTML tags (e.g., custom XML tags) will be made block tags by default.

Legacy/International Mode

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.

Changelog

0.27.2

0.27.1

0.27.0

0.26.0

0.25.0 (forked from autoclose-html)

0.24.0

0.23.0

0.22.0

0.21.0

0.20.0