-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
iedit-state and evil-change/evil-delete #3193
Comments
You should probably report this to https://github.com/syl20bnr/evil-iedit-state for completeness. |
I've tested a bit and turns out it's a bug in iedit itself: victorhge/iedit#53 |
Same issue for me while using |
According to the issue @bmag posted to iedit, it's not a bug but expected behavior. Try using I like using visual-regexp, which gives you incremental highlighting updates, so I made a private layer for it. It's good for people like me who are still learning regex. I pretty much copied this configuration. |
Ah, that makes sense. And in that case, there is a much simpler solution than using Two thoughts on remaining problems though: 1 - If iedit aborts, then either iedit or spacemacs itself should provide a message in the echo area, to explain what happened. Something like "iedit failed because a command affected text outside of iedit scope" would make it instantly clear to the user what has gone wrong. 2 - The fact that the spacemacs cursor remains red when iedit aborts (ie, indicating that it still thinks iedit is active) is clearly still a bug. It's fairly minor, since pressing escape will fix it. But still, it's definitely misreporting the internal state of the application. Thoughts on this? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
It looks to me like there is a problem when using iedit-state when words are space-delimited (ie, most, but not all of the time).
Specifically, in these cases, the evil-change and evil-delete commands (on keys c and d) drop out of iedit altogether, so my changes are applied at the current cursor position only, and all of the iedit highlighting disappears (although the cursor remains red, so iedit-state still thinks it is active).
Here is an example, showing both working and non-working behaviour. My initial buffer (in fundamental mode) contains just:
I move to the "b" in the first foobar, and then hit SPC s e d w. In this case, everything works fine and I end up with:
...which is what I want. On the other hand, if my starting buffer is just one character different, and I replace that first period with a space, viz:
...and then, once again I hit SPC s e d w then I get dumped out of iedit (highlights disappear) and my buffer looks like this:
I get essentially the same problem if I use c w instead of d w. It looks like a bug to me, but not sure if I'm the only person seeing this behaviour?
My spacemacs setup:
System Info
The text was updated successfully, but these errors were encountered: