Emmet Hot Key: Open & Closing Tag

Quick keys are the best thing since sliced bread when you have a firm grasp of them and use the ones you care about the most. I’ve been doing some research to discover a few favorite quick keys with my editor of choice and wanted to share one that I think is pretty hawt!

selecting the opening and closing tag using quick key commands in sublime text 2

Fig. 1.0 | Quick key in action using Sublime Text 2 on Mac 10.9.

This quick key is specifically for coding in HTML and allows authors to select the opening and closing tag at once by placing your cursor on the opening tag of your choice and using the quick key pattern: command + shift + k (only available with the emmet package).

Dennis Gaebel

Design Technologist passionate for Open Source, SVG, Typography, Web Animation, Interaction Development & Pattern Based Design. http://droidpinkman.io.
  1. This post has changed my life forever.

    1. You’re too kind A-Dog. Imagine the others that exist we have no awareness of!

  2. ❧ John shouted:
    2014/06/27 • 8:55 pm

    Oh its Ctrl-Shift + ‘ (apostrophe) probably because I have emmet installed?

    1. I believe Ctrl + Shift + ‘ is Zen Coding so you may have Zen Coding installed still. Either way the hot key I mentioned above is only available w/emmet and not native to Sublime. I updated the article to reflect this now. Sorry about that.

      1. ❧ John shouted:
        2014/06/29 • 4:55 pm

        thanks, much appreciated

  3. ❧ Zaki Wasik shouted:
    2014/07/09 • 9:52 am

    That’s a cool shortcut! I usually just select the name of a tag and then press CMD+D (select next occurence of selection), but that’s not working out so well if you are altering say a div-tag which has div-tags nested inside it, so I’ll definitely use this in the future. CMD+D is one of those generic shortcuts that you would wan’t to use in a ton of other cases, though, so make sure to remember that one as well 🙂

  4. ❧ Thiago Teles Pereira shouted:
    2014/07/09 • 3:43 pm

    In emmet for the ST3, the shortcut for this command is:

    ctrl + shift + ~ (split_join_tag)
    1. ❧ Jitendra Vyas shouted:
      2014/07/10 • 10:26 am

      Not working in Sublime Text 3 on Windows . I’m using…

      Ctrl + Shift + ~
      1. For Windows users on Sublime Text 3 you can use

        Ctrl + Shift + ‘
  5. Mine is deleting the whole line… Anyone experiencing the same behavior?

    1. Are you sure you have Sublime Text 2 installed along with Emmet?

Leave a Reply

Your email address will not be published. Required fields are marked *

show formatting examples
<pre class="language-[markup | sass | css | php | javascript | ruby | clike | bash]"><code>
…code example goes here…
</code></pre>

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Comment Preview

  1. John Doe shouted this comment preview:
    2014/06/23