How to edit opening and closing HTML tags simultaneously with Sublime Text.
When I’m editing HTML, I often find myself wanting to edit pairs of tags, like swapping out a set of
<span> tags for a pair of
<div> tags, or changing an
<ol> to a
It’s a pain to edit them separately, and Quick Add Next only works in the simplest of cases (when tags aren’t nested).
If you install the Emmet plugin, you’ll get a sweet shortcut that allows you to edit both tags at once.
Just hit Cmd+Shift+K (on OS X) or Ctrl+Shift+’ (Windows and Linux) to select both tags for editing.
Want more Emmet awesomesauce? Check out the Emmet poweruser tips in this week’s links.
This Week’s Links
Designer Jordan Moore covers four little-known features in Emmet, including a way it can make your site load faster.
Ever wish you could run some PHP code and see the output in Sublime? Steve Claridge can show you how.
David Turnbull writes on SitePoint about his sweet Markdown-based blogging workflow, which is very similar to the way I create this newsletter.
Shameless plug: I’m the editor of SitePoint’s business and marketing channel. If you’d like to write about lessons you’ve learned from your startup (or something more techincal, like your favorite coding tricks), email me at firstname.lastname@example.org and I’ll see if I can’t hook you up.
The command line is great and all that, but isn’t it nice when you don’t have to switch tools all the time? Chris Sevilleja provides a nice overview of how to integrate Git with Sublime.
Plugins Worth Installing
Once you’ve mastered using Git from Sublime, you can add npm commands as well.
You can always tell real hackers in the movies because they can pound out hundreds of lines of flawless code while dinosaurs rip people’s arms off.
Well, this plugin makes you look almost that cool. No dinosaurs, though.