Last Updated: September 29, 2021
·
630
· roine

Sublime text shortcut to wrap text into an HTML tag

Annoyed to write an opening and closing tag to wrap a text or an other tag? The following makes everything easier.

<kbd>Ctrl+Alt+Enter</kbd> will open a dialog and let you choose the tag name, by default div is selected.
In the dialog you can also write in a zen coding way. Example:
<kbd>CTRL+ALT+ENTER</kbd>

div.myClass#myId[data-name=bobybrown]

will become

<div class="myClass" id="myId" data-name="bobybrown"></div>

Update: Is it part of the zen Coding package?