From 4f266ca205ccfd685ac4c1ec85236d7d41691c61 Mon Sep 17 00:00:00 2001 From: 0scar Date: Tue, 15 Nov 2022 16:48:04 +0100 Subject: Simplify zshrc bindings We now use terminfo-variable keys instead of hardcoded escape codes for zsh keybindings --- .config/zsh/.zshrc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to '.config') diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 04db407..b2d2981 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -97,10 +97,6 @@ bindkey "^r" history-incremental-search-backward bindkey "${terminfo[khome]}" beginning-of-line bindkey "${terminfo[kend]}" end-of-line -bindkey "^[[3~" delete-char -bindkey "^[3;5~" delete-char -bindkey "^[[1;5C" forward-word -bindkey "^[[1;5D" backward-word # Load searching upwards with beginning of the line autoload -U up-line-or-beginning-search @@ -109,10 +105,8 @@ zle -N up-line-or-beginning-search zle -N down-line-or-beginning-search # Binded twice for compatability -bindkey "^[A" up-line-or-beginning-search -bindkey "^[OA" up-line-or-beginning-search -bindkey "^[B" down-line-or-beginning-search -bindkey "^[OB" down-line-or-beginning-search +bindkey "${terminfo[kcuu1]}" up-line-or-beginning-search +bindkey "${terminfo[kcud1]}" down-line-or-beginning-search ## Handy functions upload () { -- cgit v1.3