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

Backport all of evil-iedit-state? #20

Open
Ambrevar opened this issue Feb 15, 2018 · 5 comments
Open

Backport all of evil-iedit-state? #20

Ambrevar opened this issue Feb 15, 2018 · 5 comments
Labels

Comments

@Ambrevar
Copy link

evil-iedit-state does not seem to receive many updates.
Sadly, evil-multiedit is not exactly a drop-in replacement, I think some features are missing, namely:

  • F : restrict the scope to the function
  • p : replace occurrences with last yanked (copied) text (does not seem to work in multiedit)
  • U : Up-case the occurrences (casing with gU only applies to the current occurence)
  • C-U: down-case the occurrences (same)

Maybe that was on purpose?

@Ambrevar
Copy link
Author

This one too is missing:

  • #: prefix all occurrences with an increasing number (C-u to choose the starting number).

@amosbird
Copy link

p, U and C-U can all be achieved by first pressing V. # seems to be a promising feature.

@hlissner
Copy link
Owner

hlissner commented May 3, 2018

Sorry for the incredibly late reply! This issue slipped under my radar.

F: restrict the scope to the function

There's evil-multiedit-toggle-or-restrict-region, which, if used when a selection is active will restrict scope to that selection. There is no restrict-to-function variant, but wouldn't using iedit-restrict-function directly work?

p : replace occurrences with last yanked (copied) text

It doesn't? Do you have steps to reproduce this? p appears to work fine for me

U/C-U

This is odd. gU and gu only sometimes propagate to other occurances. You could optionally bind U and C-U in evil-multiedit-state-map to iedit-downcase-occurrences and iedit-upcase-occurrences, but I'll see if I can do something about gU and gu.

@hlissner hlissner added the bug label May 3, 2018
@Ambrevar
Copy link
Author

Pressing V is not an exact work around. It does not allow to only upcase/downcase part of the expression.

F: Yup, M-H works indeed, don't know how I missed that.

p: Hmmm, it seems to work most of the time, but I think it has a bug similar to gu/gU where it does not always propagate: only the current selection gets update with the correct kill-ring entry, while the others matches get deleted (I think).

@Ambrevar
Copy link
Author

Ambrevar commented Mar 3, 2019

Have you had time to look into this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants