Skip to content

Test: Auto selecting matching tag position #85973

Closed

Description

@octref

Refs: #47069

Complexity: 3


For #47069, we added two features:

  • F2 to rename HTML tags
  • Auto selecting tags when html.autoSelectingMatchingTags is enabled

Test that:

  • F2 to renaming opening/closing tags together works as expected
  • Auto selecting tags works as you expect for different scenarios, for example:
    • Test both valid HTML and incomplete HTML (such as tags without closing >). Make sure the behavior works as expected in valid HTML and is understandable in invalid HTML.
    • Test that when inserting space on this case: <div|></div|>, only the first cursor inserts the space (the space inserted by second cursor is auto-removed)
    • Try self closing tags such as <br> and <input>. Try both the <br> form and <br/> and <br /> form. Make sure they do not interfere with this feature working on adjacent tag pairs.
    • Try various shortcuts such as alt + Delete, alt + Right, cmd + c. Make sure this feature works with them.
    • (Mostly for Peng Lyu (@rebornix), but if you want to try a bit of Vim, go ahead) Try this feature with Vim extension. Make sure basic movements, such as hjkl for left/down/up/right and dw (delete word) and cw (change word) can work property when you position your cursor in the tags
    • Test this feature in large HTML files.
    • Test that tag auto-completion works. For example, try setting cursors in <div|></div|>, delete the div and enter d to complete div. (This will only work when primary cursor is in the beginning <div> and mirrored cursor in the ending one, not the other way around).

Activity

  1. added this to the November 2019 milestone on Dec 2, 2019
  2. removed their assignment
    on Dec 3, 2019
  3. ayyash commented on Dec 7, 2019

    @ayyash

    guys in the previous insider version I was able to disable this feature with auto select configuration, now I can't find it, what was it replaced with?
    Reason is very simple, when I want to move the opening tag by keyboard, but not the closing tag... that isn't possible while this feature is active. And there is a bug, if I "ctrl+Z" to undo, the cursors are stuck, any keyboard move, moves the two cursors together.

    Never mind, found it :)
    image

  4. octref commented on Dec 7, 2019

    @octref
    ContributorAuthor

    Ayyash (@ayyash) It's called html.mirrorCursorOnMatchingTag now, and you can temporarily exit this mode with ESC.

  5. locked and limited conversation to collaborators on Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions