-
Notifications
You must be signed in to change notification settings - Fork 283
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
'at' and 'it' motions for working with tags doesn't behave similar to vim #1815
Comments
Fixes part of emacs-evil#1815
Thanks for the bug report @ankitshahit . I've fixed 2.1 (If there is no text and the cursor is in tag, entire line gets deleted) in master - please check if this works as expected. For the other points, I can replicate the fact that they behave differently to vim. I'm not in as much of a rush to fix these as I personally think their behaviour makes more sense, but I'm open to a PR and may get around to it myself at some point. |
The same difference is with |
@Tekki it's not really comparable to |
Furthermore, if you take an example like this:
with the cursor at edit: the correct analogy would be with the |
Hey @tomdl89 Thanks a lot for quick fix! It works for 2.1, appreciate it. |
I just wanted to show that the behavior of Vim is the same, not that it makes sense. Your example with |
Sorry @Tekki I think I misunderstood you. |
Issue type
Issue with core feature of vim, changing and deleting text between tags
Environment
Emacs version: 28.2 (Build 2 x86_64-w64-mingw32) of 2022-09-13
Operating System: Windows 10
Evil version: evil-git-477807f
Evil installation type: ELPA
Graphical/Terminal: graphical
Tested in a
make emacs
session (see CONTRIBUTING.md): NoReproduction steps
Expected behavior
When using command such as cit and dit.
Scenario 1: the cursor is at the start of line (using 0 shortcut)
When there is no text between tags, and the cursor is at the start of line (using 0 shortcut).
Evil mode deletes the parent tag.
Though vim jumps the cursor between the tag
(VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 25 2020 11:44:06)
Assume
**|**
to be the cursor for demonstration purposes.Originally cursor is the pipe -
**|** <label for="edit"></label>
Expected cursor is the pipe -
<label for="edit">**|**</label>
after citScenario 2: the cursor is at the start of tag
Evil mode deletes the parent tag.
Though vim jumps the cursor between the tag
(VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 25 2020 11:44:06)
Assume pipe to be the cursor
Originally cursor is the pipe -
<**|** label for="edit"></label>
Expected cursor is the pipe -
<label for="edit">**|**</label>
after citActual behavior
While running for scenario 1
While running for scenario 2
If there is no text and the cursor is in tag, entire line gets deleted.
<**|**label for="edit"></label>
When the cursor is at start of the line and no text is provided, entire line gets deleted.
(using 0 shortcut)
**|** <label for="edit"></label>
If there is text between tag and cursor is at the start of line (again using 0 shortcut) still the entire line gets deleted.
**|** <label for="edit">text</label>
When cursor is at the tag, and tag has some text. When cit is pressed, the line works as expected.
Further notes
The text was updated successfully, but these errors were encountered: