From f20cfc68e81be754521672541fd6ff25983f402c Mon Sep 17 00:00:00 2001 From: Randy Hancock Date: Mon, 1 Aug 2011 10:10:42 -0500 Subject: [PATCH] Fix edit-command-line binding This binding doesn't work when the edit-command-line.zsh file is loaded after the key-bindings.zsh file because 'bindkey -e' in key-bindings.zsh resets the binding. Moving the bindings to they key-bindings.zsh file and removing edit-command-line.zsh. --- lib/edit-command-line.zsh | 3 --- lib/key-bindings.zsh | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 lib/edit-command-line.zsh diff --git a/lib/edit-command-line.zsh b/lib/edit-command-line.zsh deleted file mode 100644 index db2000325..000000000 --- a/lib/edit-command-line.zsh +++ /dev/null @@ -1,3 +0,0 @@ -autoload -U edit-command-line -zle -N edit-command-line -bindkey '\C-x\C-e' edit-command-line diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index 9c2dda35a..d9611b557 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -26,6 +26,11 @@ bindkey "^[[3~" delete-char bindkey "^[3;5~" delete-char bindkey "\e[3~" delete-char +# Edit the current command line in $EDITOR +autoload -U edit-command-line +zle -N edit-command-line +bindkey '\C-x\C-e' edit-command-line + # consider emacs keybindings: #bindkey -e ## emacs key bindings