From ecd5e16d98c76627481512e3a323f5711baee377 Mon Sep 17 00:00:00 2001 From: Trysdyn Black Date: Sat, 16 Apr 2022 07:28:46 -0700 Subject: [PATCH] Add editing of long command lines to zsh --- .zshrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 49e2b6b..f5a13c3 100644 --- a/.zshrc +++ b/.zshrc @@ -33,7 +33,7 @@ if [[ -a /usr/bin/most ]]; then export PAGER="most -w" fi -# Key binds +# Generic navigation keybinds bindkey "^[[H" beginning-of-line # HOME bindkey "^[[F" end-of-line # END bindkey "^[[3~" delete-char # DEL @@ -65,5 +65,10 @@ setopt appendhistory autoload -Uz compinit && compinit zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' +# Edit long command lines in vim with ^x^e +autoload -U edit-command-line +zle -N edit-command-line +bindkey '^x^e' edit-command-line + # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh