Close any open HTML tag with a shortcut


#1

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.


#2

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.


#3

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 + .


#4

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.


#5

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.


#6

This is default behavior since ST3 iirc.


#7

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


Autoclose HTML tags
#8

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


#9

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.


#10

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


#11

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


#12

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.


#13

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


#14

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


#15

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


#16

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.


#17

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.


#18

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


#19

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


#20

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