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