From 2611bd3b4f54bd74f9cd991c5cf0c88469fd95fb Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 20:57:53 +0000 Subject: [PATCH] Update keybinds --- home/.config/sh/keybinds | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/home/.config/sh/keybinds b/home/.config/sh/keybinds index 8b6f811..8b10f0a 100755 --- a/home/.config/sh/keybinds +++ b/home/.config/sh/keybinds @@ -31,22 +31,20 @@ if [[ -n "${terminfo[kcud1]}" ]]; then fi # [Home] - Go to beginning of line -bindkey "^[[H" beginning-of-line +[[ -n "${terminfo[khome]}" ]] && bindkey "${terminfo[khome]}" beginning-of-line || bindkey "^[[H" beginning-of-line # [End] - Go to end of line -bindkey "^[[F" end-of-line +[[ -n "${terminfo[kend]}" ]] && bindkey "${terminfo[kend]}" end-of-line || bindkey "^[[F" end-of-line # [Shift-Tab] - move through the completion menu backwards [[ -n "${terminfo[kcbt]}" ]] && bindkey "${terminfo[kcbt]}" reverse-menu-complete # [Backspace] - delete backward bindkey '^?' backward-delete-char -# [Ctrl-Supr] - delete forward -bindkey "^[[3~" delete-char -# [Ctrl-Delete] -bindkey "^[3;5~" kill-word - +# [Delete] - delete forward +[[ -n "${terminfo[kdch1]}" ]] && bindkey "${terminfo[kdch1]}" delete-char || bindkey "^[[3~" delete-char # [Ctrl-Delete] - delete whole forward-word bindkey '^[[3;5~' kill-word + # [Ctrl-RightArrow] - move forward one word bindkey '^[[1;5C' forward-word # [Ctrl-LeftArrow] - move backward one word