From 4594ce53a22562b47087e6ab4f8bd7ec3afb3665 Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Tue, 22 Feb 2022 18:35:09 -0500 Subject: [PATCH] Add keybinds to shells --- configs/zsh/.zshrc | 1 + configs/zsh/keybinds.sh | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 configs/zsh/keybinds.sh diff --git a/configs/zsh/.zshrc b/configs/zsh/.zshrc index 1202358..5ffce37 100644 --- a/configs/zsh/.zshrc +++ b/configs/zsh/.zshrc @@ -5,6 +5,7 @@ export EWCONFIG_ROOT="$HOME/.config/ewconfig" # Load my custom prompt and macros . $EWCONFIG_ROOT/configs/zsh/prompt.sh . $EWCONFIG_ROOT/configs/zsh/macros.sh +. $EWCONFIG_ROOT/configs/zsh/keybinds.sh # Load per-host configuration if [ -f $EWCONFIG_ROOT/configs/zsh/by_host/$HOSTNAME.sh ]; then diff --git a/configs/zsh/keybinds.sh b/configs/zsh/keybinds.sh new file mode 100644 index 0000000..2e8d184 --- /dev/null +++ b/configs/zsh/keybinds.sh @@ -0,0 +1,23 @@ +### ctrl+arrows +bindkey "\e[1;5C" forward-word +bindkey "\e[1;5D" backward-word +# urxvt +bindkey "\eOc" forward-word +bindkey "\eOd" backward-word + +### ctrl+delete +bindkey "\e[3;5~" kill-word +# urxvt +bindkey "\e[3^" kill-word + +### ctrl+backspace +bindkey '^H' backward-kill-word + +### ctrl+shift+delete +bindkey "\e[3;6~" kill-line +# urxvt +bindkey "\e[3@" kill-line + +# Home and end +bindkey "^[[H" beginning-of-line +bindkey "^[[F" end-of-line \ No newline at end of file