Skip to content

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

Closed

Description

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

Activity

  1. changed the title [-][html] auto renameL does not work with non-empty selection[/-] [+][html] auto rename does not work with non-empty selection[/+] on Dec 3, 2019
  2. octref commented on Dec 5, 2019

    @octref
    Contributor

    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.

  3. added
    *as-designed
    on Dec 5, 2019
  4. aeschli commented on Dec 5, 2019

    @aeschli
    ContributorAuthor

    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.

  5. aeschli commented on Dec 5, 2019

    @aeschli
    ContributorAuthor

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

  6. added
    feature-request
    and removed
    *as-designed
    on Dec 5, 2019
  7. added this to the Backlog milestone on Dec 5, 2019
  8. changed the title [-][html] auto rename does not work with non-empty selection[/-] [+][html] Mirror Cursor does not work with double-click selection[/+] on Dec 13, 2019
  9. ryanaltvater commented on Dec 16, 2019

    @ryanaltvater

    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. 👍

  10. added
    editor-synced-region
    on Jan 30, 2020
  11. aeschli commented on May 5, 2020

    @aeschli
    ContributorAuthor

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

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

Metadata

Metadata

Labels

editor-synced-regionfeature-requesthtml

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions