Given
<dl>
<dt>Term</dt>
<super-duper>Definition</super-duper>
<!-- ☝️ cursor here -->
</dl>
I'd like to perform a text action, e.g. gwat ("Go wrap a tag") which would prompt for an emmet abbreviation then wrap the text object (the tag) in an abbreviation.
So in that example, if I performed: gwat dd.super <cr>, then I would get the following:
<dl>
<dt>Term</dt>
<dd class="super">
<super-duper>Definition</super-duper>
</dd>
</dl>
If then, I visually selected the dt and dd tags, and performed gw div <cr>, I'd get:
<dl>
<div>
<dt>Term</dt>
<dd class="super">
<super-duper>Definition</super-duper>
</dd>
</div>
</dl>
Given
I'd like to perform a text action, e.g.
gwat("Go wrap a tag") which would prompt for an emmet abbreviation then wrap the text object (the tag) in an abbreviation.So in that example, if I performed:
gwatdd.super<cr>, then I would get the following:If then, I visually selected the
dtandddtags, and performedgwdiv<cr>, I'd get: