From 5d62111efa93a5c49674e8309f7b819685e97662 Mon Sep 17 00:00:00 2001 From: Vladimir Hodakov Date: Mon, 27 Apr 2020 18:54:51 +0400 Subject: [PATCH] Fix keybinding to properly handle letter O --- .gitignore | 1 + zsh/30-keys.zsh | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index e703ff5..4bec238 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *kate-swp fabfile* .DS_Store* +.idea diff --git a/zsh/30-keys.zsh b/zsh/30-keys.zsh index 5217e58..3dda19c 100644 --- a/zsh/30-keys.zsh +++ b/zsh/30-keys.zsh @@ -71,10 +71,11 @@ case "${TERM}" in bindkey '[C' emacs-forward-word # esc right ;; *rxvt*) # rxvt derivatives - bindkey '\eOc' forward-word # ctrl right - bindkey '\eOd' backward-word # ctrl left - bindkey '\e\e[D' backward-word ### Alt left - bindkey '\e\e[C' forward-word ### Alt right + bindkey '\eOc' forward-word # ctrl right + bindkey '\eOd' backward-word # ctrl left + bindkey '\e\e[D' backward-word ### Alt left + bindkey '\e\e[C' forward-word ### Alt right + # workaround for screen + urxvt bindkey '\e[7~' beginning-of-line # home bindkey '\e[8~' end-of-line # end @@ -85,10 +86,10 @@ case "${TERM}" in bindkey '\e[H' beginning-of-line # home bindkey '\e[F' end-of-line # end bindkey '\e[3~' delete-char # delete - bindkey '^[[C' forward-word # ctrl right - bindkey '^[[D' backward-word # ctrl left - bindkey 'OC' forward-word # ctrl right - bindkey 'OD' backward-word # ctrl left + bindkey '^[[C' forward-word # ctrl right + bindkey '^[[D' backward-word # ctrl left + bindkey '\eOC' forward-word # ctrl right + bindkey '\eOD' backward-word # ctrl left bindkey '^[[1;3C' forward-word # alt right bindkey '^[[1;3D' backward-word # alt left # workaround for screen + xterm @@ -104,4 +105,4 @@ case "${TERM}" in bindkey '^[[1;5C' forward-word # ctrl right bindkey '^[[1;5D' backward-word # ctrl left ;; -esac \ No newline at end of file +esac