From 5072fe6f9cacbf2386440b1004ace2573b5cf28b Mon Sep 17 00:00:00 2001 From: TEC Date: Sat, 1 May 2021 22:46:25 +0800 Subject: [PATCH] Spray: improve appearance and evil support --- config.org | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/config.org b/config.org index 33cf7d4..5fd968e 100644 --- a/config.org +++ b/config.org @@ -2317,11 +2317,36 @@ add package src directories to projectile. This isn't desirable in my opinion. :actions '(insert)) #+end_src ** Spray -Let's make this suit me slightly better. + +It would be nice if Spray's default speed suited me better, and the keybindings +worked in evil mode. Let's do that and make the display slightly nicer while +we're at it. + #+begin_src emacs-lisp -(setq spray-wpm 500 - spray-height 700) +(use-package! spray + :commands spray-mode + :config + (setq spray-wpm 600 + spray-height 800) + (defun spray-mode-hide-cursor () + "Hide or unhide the cursor as is appropriate." + (if spray-mode + (setq-local spray--last-evil-cursor-state evil-normal-state-cursor + evil-normal-state-cursor '(nil)) + (setq-local evil-normal-state-cursor spray--last-evil-cursor-state))) + (add-hook 'spray-mode-hook #'spray-mode-hide-cursor) + (map! :map spray-mode-map + "" #'spray-start/stop + "f" #'spray-faster + "s" #'spray-slower + "t" #'spray-time + "" #'spray-forward-word + "h" #'spray-forward-word + "" #'spray-backward-word + "l" #'spray-backward-word + "q" #'spray-quit)) #+end_src + ** Theme magic Let's automatically update terminals on theme change (as long as ~pywal~ is available).