SHARE
TWEET

Untitled

a guest Nov 8th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function show_mode_rp {
  2.   RPS1="${${KEYMAP/vicmd/-- NORMAL --}/(main|viins)/-- INSERT --}"
  3.   # RPS2=$RPS1
  4.   zle reset-prompt
  5. }
  6.  
  7. function show_mode_cursor {
  8.   case ${KEYMAP} in
  9.     (vicmd)
  10.       print -n '\e[1 q'
  11.       print -n '\e]12;cyan\a'
  12.       ;;
  13.     (main|viins|*)
  14.       print -n '\e[1 q'
  15.       print -n '\e]12;pink\a'
  16.       ;;
  17.   esac
  18. }
  19.  
  20. function zle-line-init zle-keymap-select {
  21.   show_mode_cursor
  22.   show_mode_rp
  23. }
  24. zle -N zle-line-init
  25. zle -N zle-keymap-select
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top