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

Take casing into consideration when matching #48

Open
ema2159 opened this issue Jan 11, 2022 · 3 comments
Open

Take casing into consideration when matching #48

ema2159 opened this issue Jan 11, 2022 · 3 comments
Labels

Comments

@ema2159
Copy link

ema2159 commented Jan 11, 2022

What would you like to know?

Is it possible to configure evil-multiedit so strings with different casing are not matched at the same time? Currently, words like Ellipse, ellipse, and eLlIpSe for example will be matched at the same time.

@hlissner hlissner added bug and removed question labels Jan 12, 2022
@hlissner
Copy link
Owner

hlissner commented Jan 12, 2022

Since evil-multiedit isn't respecting iedit-case-sensitive, I'll consider this a bug. This should be a simple fix. Give this a try first:

(defun make-evil-multiedit-case-sensitive (fn &rest args)
  (let ((case-fold-search (not iedit-case-sensitive)))
    (apply fn args)))

(advice-add #'evil-multiedit-match-and-next :around #'make-evil-multiedit-case-sensitive)

@andreasknoepfle
Copy link

andreasknoepfle commented Jun 9, 2022

Hey @hlissner 👋

I came across the same issue and for me the above patch totally works 🙏 💚
Do you plan to include the fix into Doom or evil-multiedit at some point?

Cheers,
Andi

@skrat
Copy link

skrat commented Nov 13, 2023

Same here, now this is very common, say I have a type Ray and symbol ray, eg. void foo(ray: Ray). And with the default, case-insensitive behavior, it will select both ray and Ray, which, when I'm renaming or moving the type, is annoying af.

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

4 participants