dot/emacs: Add Viper cursor-colour flail.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 3 Oct 2021 14:20:39 +0000 (15:20 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 3 Oct 2021 14:22:41 +0000 (15:22 +0100)
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.

dot/emacs

index 41f8130..34d7500 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
              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)
   (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"