1

I have this function:

crux-rename-file-and-buffer

, but when I do M-x rename, why isn't this shown as an alternative?

I thought ivy was supposed to assist with that, using a fuzzy search?

Why is it not picking this up?

My config to enable fuzzy:

  (use-package counsel
    :ensure t
    :config
    (use-package flx
      :ensure t)
    (ivy-mode 1)
    (setq ivy-height 20)
    (setq ivy-re-builders-alist '((t . ivy--regex-fuzzy))))

Any pointers?;)

Jason Hunter
  • 709
  • 4
  • 10
  • 1
    Please include your function crux-rename-file-and-buffer. – Phil Hudson Apr 26 '22 at 08:27
  • Not sure what you mean. That function comes from the crux package. I see crux-rename-file-and-buffer, if I start to type crux after M-x. It's just that it won't pop up if I start to write rename. – Jason Hunter Apr 26 '22 at 19:01

1 Answers1

2

Is the Counsel fuzzy search prompt starting with a "^" character? If so, that references the beginning of the expression, so it won't find your results until you start typing the first character of the function name.

To execute the search as you described, simply delete the "^" character from the search prompt, then enter your fuzzy search string.

Chris McMahan
  • 259
  • 1
  • 2