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

[html] Mirror Cursor does not work with double-click selection #86052

Closed
aeschli opened this issue Dec 3, 2019 · 5 comments
Closed

[html] Mirror Cursor does not work with double-click selection #86052

aeschli opened this issue Dec 3, 2019 · 5 comments
Assignees
Labels
editor-synced-region Issues related to synced region functionality in editor feature-request Request for new features or functionality html HTML support issues
Milestone

Comments

@aeschli
Copy link
Contributor

aeschli commented Dec 3, 2019

Testing #85973

<html>
    <foo class='fff'>

    </foo>
</html>
  • double click on foo to select the full word
  • type a new name. Does not rename the closing foo
@aeschli aeschli added the html HTML support issues label Dec 3, 2019
@aeschli aeschli changed the title [html] auto renameL does not work with non-empty selection [html] auto rename does not work with non-empty selection Dec 3, 2019
@octref
Copy link
Contributor

octref commented Dec 5, 2019

Since this is achievable with both F2 and click end of foo and option + delete (both are shorter operations).

I stayed away from handling selections since imagine one goes from left to right on line one:

<|div id="foo">
</|div> 

When the selection advances pass div , how should the bottom selection behave?

  • If you stop bottom selection as top grows, it's unintuitive since when you grow from d to div, bottom selection grew as well
  • Just drop bottom selection seems weird

Not doing this also simplifies the logic a lot.

@octref octref closed this as completed Dec 5, 2019
@octref octref added the *as-designed Described behavior is as designed label Dec 5, 2019
@aeschli
Copy link
Contributor Author

aeschli commented Dec 5, 2019

Selecting the whole tag is the typical interaction I do when I want to change/rename a tag. Select the full tag with doubleclick, enter the new tag name, overwriting the old name. So It would be great if that also works with auto rename.

Expanding a selection is a different issue. I rarely do that.
IMO if the selection is just convering the tag: create a multicursor selection on the closing tag.
As soon as it spans more, do not create/drop multicursor selection on the closing tag.
I think that's very intuitive and matches the behaviour of the empty cursor case.

@aeschli aeschli reopened this Dec 5, 2019
@aeschli
Copy link
Contributor Author

aeschli commented Dec 5, 2019

Please reconsider or, at least, reopen as feature request so others can add their opinions too.

@aeschli aeschli closed this as completed Dec 5, 2019
@octref octref added feature-request Request for new features or functionality and removed *as-designed Described behavior is as designed labels Dec 5, 2019
@octref octref reopened this Dec 5, 2019
@octref octref added this to the Backlog milestone Dec 5, 2019
@octref octref changed the title [html] auto rename does not work with non-empty selection [html] Mirror Cursor does not work with double-click selection Dec 13, 2019
@octref octref modified the milestones: Backlog, December/January 2020 Dec 13, 2019
@ryanaltvater
Copy link

Neither double-click or manual selection of a tag name works, which for me are more natural behaviors than positioning the cursor with the arrow keys.

I've been waiting for the ability to change tag names for a while, so this is a leap in the right direction. Just need to nail down the various selection methods. 👍

@octref octref added the editor-synced-region Issues related to synced region functionality in editor label Jan 30, 2020
@octref octref modified the milestones: January 2020, Backlog Jan 30, 2020
@octref octref assigned aeschli and unassigned octref May 1, 2020
@aeschli
Copy link
Contributor Author

aeschli commented May 5, 2020

This works now (when enabling the feature with "editor.renameOnType": true

@aeschli aeschli closed this as completed May 5, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jun 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-synced-region Issues related to synced region functionality in editor feature-request Request for new features or functionality html HTML support issues
Projects
None yet
Development

No branches or pull requests

3 participants