hlissner / evil-multiedit

Multiple cursors for evil-mode, based on iedit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Take casing into consideration when matching

ema2159 opened this issue · comments

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.

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)

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

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.