summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandy Hancock <rhancock@genome.wustl.edu>2011-08-01 10:10:42 -0500
committerRandy Hancock <rhancock@genome.wustl.edu>2011-08-01 13:06:52 -0500
commitf20cfc68e81be754521672541fd6ff25983f402c (patch)
tree283d80a5e90d0e2137781ea5ba1b4fcefe37c496
parentdee8171fa9494d1aa6c01cb86de1b70b480ee5c4 (diff)
downloadzsh-f20cfc68e81be754521672541fd6ff25983f402c.tar.gz
zsh-f20cfc68e81be754521672541fd6ff25983f402c.tar.bz2
zsh-f20cfc68e81be754521672541fd6ff25983f402c.zip
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.
-rw-r--r--lib/edit-command-line.zsh3
-rw-r--r--lib/key-bindings.zsh5
2 files changed, 5 insertions, 3 deletions
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