From 33e3f2f66aff4f2dc33986559b0c0c4516118c91 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Mon, 8 Nov 2021 09:27:40 -0800 Subject: feat(wpcarro/emacs): Prefer Vim style of word-searching In my opinion the following versions of compound words should be searched similarly... - `testingThisOut` (camel case) - `TestingThisOut` (class case) - `testing_this_out` (snake case) - `testing-this-out` (kebab case) ...but Emacs's default searching treats the snake and kebab cases differently, which makes it difficult to search for buffer-local occurrences of symbols in Python, Elisp (among other languages). This has been bothering me for some time. I must've attempted to fix this awhile ago by using `setq` (when I should've used `customize-set-variable`, which makes me wonder: how much of my configuration is flaky because I'm using `setq` where I should be using `customize-set-variable`? For more context about this change, see `describe-variable` for `evil-symbol-word-search`. Change-Id: Ie03f0da119f59e04abc5de3143aa6edaf6115168 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4804 Tested-by: BuildkiteCI Reviewed-by: wpcarro Autosubmit: wpcarro --- users/wpcarro/emacs/.emacs.d/wpc/keybindings.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el b/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el index d55c8f6258..2a2160741e 100644 --- a/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el +++ b/users/wpcarro/emacs/.emacs.d/wpc/keybindings.el @@ -102,7 +102,7 @@ (general-unbind 'normal "s" "M-." "C-p" "C-n") (general-unbind 'insert "C-v" "C-d" "C-a" "C-e" "C-n" "C-p" "C-k") -(setq evil-symbol-word-search t) +(customize-set-variable 'evil-symbol-word-search t) (evil-mode 1) (evil-collection-init) (evil-commentary-mode) -- cgit 1.4.1