Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Auto selecting matching tag position #85973

Closed
3 tasks done
octref opened this issue Dec 2, 2019 · 2 comments
Closed
3 tasks done

Test: Auto selecting matching tag position #85973

octref opened this issue Dec 2, 2019 · 2 comments

Comments

@octref
Copy link
Contributor

octref commented Dec 2, 2019

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 @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).
@ayyash
Copy link

ayyash commented Dec 7, 2019

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

@octref
Copy link
Contributor Author

octref commented Dec 7, 2019

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

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants