From: Mark Wooding Date: Sun, 3 Oct 2021 14:20:39 +0000 (+0100) Subject: dot/emacs: Add Viper cursor-colour flail. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/6e6faf38a021861ccbf73634ed3dd5b9383d961c?ds=sidebyside;hp=fbc10dba9a1ff359cf6f3774a240189e4cd25512 dot/emacs: Add Viper cursor-colour flail. What I want is for the cursor to be its usual red colour in insert mode and green in command mode, but there doesn't seem to be an easy way to do that. Committing my flail in the hopes that I debug it eventually. --- diff --git a/dot/emacs b/dot/emacs index 41f8130..34d7500 100644 --- a/dot/emacs +++ b/dot/emacs @@ -429,9 +429,11 @@ viper-ex-style-editing nil viper-expert-level 5 viper-inhibit-startup-message t + ;;viper-insert-state-cursor-color "red" viper-no-multiple-ESC nil viper-re-query-replace t viper-re-search t + ;;viper-replace-overlay-cursor-color "red" viper-shift-width 2 viper-vi-style-in-minibuffer nil viper-want-ctl-h-help t) @@ -449,6 +451,13 @@ (tool-bar-mode 0)) (trap (or mdw-fast-startup (global-auto-revert-mode t))) +(defun mdw-set-viper-cursor-colour () + ;; ?? doesn't seem to work + (set-frame-parameter nil 'cursor-color "green") + (message ";; %S" post-command-hook) + (sit-for 2)) +;;(add-hook 'viper-vi-state-hook 'mdw-set-viper-cursor-colour) + (defvar mdw-black-background t) (eval-after-load "outline"