# HG changeset patch # User Mikael Berthe # Date 1636537500 -3600 # Node ID 4767c5a8b1f9bf0f0551d1d78e94dfd700d32436 # Parent 1f3d221e177019afed0c8f62eae4446ff812019f Add stterm key codes diff -r 1f3d221e1770 -r 4767c5a8b1f9 zshrc.d/20-prompt.zrc --- a/zshrc.d/20-prompt.zrc Sat Oct 02 10:49:57 2021 +0200 +++ b/zshrc.d/20-prompt.zrc Wed Nov 10 10:45:00 2021 +0100 @@ -4,6 +4,7 @@ # Enable my Vim-like mode for supported terms if [[ "$TERM" == rxvt* || "$TERM" == xterm* || + "$TERM" == st-* || "$TERM" == screen* || "$TERM" == tmux* ]] then diff -r 1f3d221e1770 -r 4767c5a8b1f9 zshrc.d/60-vi-showmode.zrc --- 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.