Skip to content

Wrap in abbreviation #44

@bennypowers

Description

@bennypowers

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions