Close any open HTML tag with a shortcut


In TextMate and Sublime Text you can close andy open tag by hitting CMD + ALT + .
I’d love to be able to do the same in Atom.


This is the shortcut that I use most often in Sublime and keep trying to do it in Atom. Would love to see this become a thing.


In Settings -> Autocomplete you will see there is a shortcut of control + space. I personally would like to find a way to map this to the Tab key. Maybe you can remap the shortcut to CMD + ALT + .


Not quite what I’m looking for. Autocomplete just helps you find the tag name you were looking for. In Sublime, CMD + ALT + . would close the open tag for you.


Perhaps I have a special package for Sublime, but when I type “</” it completes the tag. I do have to type two characters, but it’s about the same as many hotkeys. This would be a great option also.


This is default behavior since ST3 iirc.


Coda does the same. Would love if </ automatically closed the open tag.

Autoclose HTML tags

Definitely agree - ST3’s auto-tag closing was the first thing I looked for when setting up Atom. Miss that functionality.


I’d love to see the “</” auto-complete functionality… Although, I just discovered Emmet after looking through these feature threads, and hot damn, it’s awesome.


Missing it too… to the point I actually came looking for it on the forum. :frowning:


Did you guys have a look at this?
Autoclose HTML :smiley:


That’s nice but it fixes a different need for me.

If I encounter something like this

<div class="test">
  <span>Here goes text

and the cursor is at the end of that text I’d like to hit CMD + ALT + . to close the span and by hitting it again close the div.


@dantz ok mate I see now.
If I come across a package like this, I’ll be sure to post it here! :smiley:


thanks. But the autocomplete on eis appreciated as well :smiley:


I would like to see this become a feature as well.


I would like to make a clear distinction between autoclose and the close-by-shortcut feature.
Both of them can be pretty useful, but definitely not the same. In fact, I have the autoclose package and I miss badly the close-by-command one.
Also agreed that ALT + Command + . alike Textmate and Sublime would be the best default shortcut.


Also missing the close-by-shortcut feature. ALT + CMD + . for closing any HTML tag is second nature.
In Sublime and TextMate, this shortcut applied to any open XML-like tag.


Would like to see the typing-"</" closing option as well.


I’ve made a plugin that covers this: close-tags. Let me know what you think!


nice work! alt+cmd+. now closes my tags just like Textmate or Sublime.