-
Notifications
You must be signed in to change notification settings - Fork 29
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
Side effects of s:MatchesInRange()
#18
Comments
I would guess an implementation based on |
@dbarnett Yes, initially I had the same idea as you. A But if Also, there are a few workarounds to the possible slowness of |
Alright cool, sounds like you've investigated in way more depth than I have. =) |
Thanks for investigating these! Indeed, I have used I agree with your assessment - let's fix what we can within the current solution. Pull requests are welcome :) |
One side effect of For example:
Without the plugin, the last The case can be fixed by changing the above mentioned line to
A PR #20 is created for this. |
The side effect of changing the last used flags is not addressed. |
Inside the function
s:MatchesInRange()
, this command is executed:I think it has several undesired effects, some of which could be mitigated.
It adds an entry in the jumplist: this could be solved with
:keepjumps
:It alters the
[
and]
marks: this could be solved by saving/restoring the marks:It makes you lose some metacharacters and flags like
~
and&
(see:h :&
and:h :~
).For this issue, I have no idea how to fix it. I've tried to think about mechanisms to save and restore them, but they are not reliable.
You would need to find a way to execute the substitution without Vim logging anything, but I don't know if it's possible.
The text was updated successfully, but these errors were encountered: