Closed dwrz closed 7 months ago
You can write a toggle command and bind it to a key. It may be necessary to tell the completion UI to refresh (to clear the completion candidate cache, since the input did not change), for example in Vertico:
(defun +orderless-toggle-smart-case ()
(interactive)
(message
"Smart case: %s"
(setq-local orderless-smart-case (not orderless-smart-case)))
(setq-local vertico--input t)) ;; Enforce Vertico refresh
(keymap-set vertico-map "M-$" #'+orderless-toggle-smart-case)
Do you have any suggestions on being able to switch between smart and strict while in the middle of a search?
I'm currently manually setting
orderless-smart-case
when I need strict search.