zshrc.d/60-vi-showmode.zrc
changeset 53 4767c5a8b1f9
parent 52 1f3d221e1770
--- a/zshrc.d/60-vi-showmode.zrc	Sat Oct 02 10:49:57 2021 +0200
+++ b/zshrc.d/60-vi-showmode.zrc	Wed Nov 10 10:45:00 2021 +0100
@@ -272,6 +272,15 @@
   bindkey -M vicmd '^[[1~'  beginning-of-line   # Home
   bindkey -M viins '^[[4~'  end-of-line         # End
   bindkey -M vicmd '^[[4~'  end-of-line         # End
+elif [[ $TERM == st || $TERM == st-* ]]; then
+    bindkey -M viins '^[[H'  beginning-of-line
+    bindkey -M vicmd '^[[H'  beginning-of-line
+    bindkey -M viins '^[[4~' end-of-line    # End with stterm
+    bindkey -M vicmd '^[[4~' end-of-line    # End with stterm
+    bindkey -M viins '^[[P'  delete-char    # Del with stterm
+    bindkey -M vicmd '^[[P'  delete-char    # Del with stterm
+    bindkey -M viins '^[[4h' vi-replace     # Ins with stterm
+    bindkey -M vicmd '^[[4h' vi-insert
 fi
 
 # Edit the command line using your usual editor.