From 7e4ae50282f66bb281a8be123bee618dd7d44fc5 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 19 Feb 2021 21:31:07 +0000 Subject: [PATCH] home: zsh: add extra mappings Once again, old habits die hard... --- home/zsh/default.nix | 1 + home/zsh/extra-mappings.zsh | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 home/zsh/extra-mappings.zsh diff --git a/home/zsh/default.nix b/home/zsh/default.nix index bdff3be..2e9e05c 100644 --- a/home/zsh/default.nix +++ b/home/zsh/default.nix @@ -39,6 +39,7 @@ initExtra = lib.concatMapStrings builtins.readFile [ ./completion-styles.zsh + ./extra-mappings.zsh ./options.zsh ]; diff --git a/home/zsh/extra-mappings.zsh b/home/zsh/extra-mappings.zsh new file mode 100644 index 0000000..abd6e58 --- /dev/null +++ b/home/zsh/extra-mappings.zsh @@ -0,0 +1,14 @@ +# Fix delete key not working +bindkey "\e[3~" delete-char + +# Fix Ctrl+u killing from the cursor instead of the whole line +bindkey \^U backward-kill-line + +# Use Ctrl+x-(Ctrl+)e to edit the current command line in VISUAL/EDITOR +autoload -U edit-command-line +zle -N edit-command-line +bindkey '^xe' edit-command-line +bindkey '^x^e' edit-command-line + +# Enable Shift-Tab to go backwards in completion list +bindkey '^[[Z' reverse-menu-complete