Skip to content

Feature request: Treat self-closing XML/HTML tags as <> #376

@ebrannin-bw

Description

@ebrannin-bw

Steps to reproduce

  1. Make a new document:
<outer>
<inner />
</outer>
  1. Put the cursor in the middle of <inner />: /inn
  2. Type ysat<middle> (not shown below) or ``ysatmiddle>` (shown)

Expected result:

<outer>
<middle>
  <inner />
</middle>
</outer>

Observed result

<middle>
  <outer>
  <inner />
  </outer>
</middle>

Workaround

ysa<<middle> or ysa<<C-T>middle>

Background

Self-closing tags come up in HTML5, XML, React, etc.

I was just turning a React component from a flex-row into a table, and as I wrapped each element with <td> I had to switch between ysat and ysa< depending on if it was self-closing or not.

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