某个 buffer 中有大量 \Delta
和 \delta
。我现在只想搜 \delta
不想搜 \Delta
, 但我输入 \delta
也会有 \Delta
. 默认行为好像是 smart, 我尝试在 buffer 中设置 completion-ignore-case
为 nil, 没有一点用,还是会搜出 \Delta
, 怎么办?
这种问题,去代码里搜索case应该很容易找到答案啊。
我不用consult,但是swiper一搜顺着读一下代码就大概知道了
1 个赞
1 个赞
总结一下楼上的回答,如果是对所有 swiper 起作用:
(setq ivy-case-fold-search-default nil)
如果临时起作用,在 minibuffer 中按 C-o C
(需要 (require 'ivy-hydra)
), 再按 C-o
退出 hydra.
1 个赞
;; case sensitive in consult
;; If the variable completion-ignore-case is non-nil, completion ignores case when comparing the input against the possible matches.
;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Minibuffer-Completion.html
(setq completion-ignore-case nil)