Przeglądaj źródła

Add command line editing to zsh

This is default functionality in bash that is interesting to have back
in zsh. This will be put in to test if getting used to using it turns
out to be good practice.

Revert this commit if not.
Weiyi Lou 10 lat temu
rodzic
commit
2d4db83d7a
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      zsh/custom/lib/key-bindings.zsh

+ 5 - 0
zsh/custom/lib/key-bindings.zsh

@@ -65,3 +65,8 @@ bindkey '^Z' fancy-ctrl-z
 
 # <S-Tab> to tab backwards through autocomplete suggestions.
 bindkey '^[[Z' reverse-menu-complete
+
+# Toggle Command Line Editing with <C-x><C-e>, like bash.
+autoload -U edit-command-line
+zle -N edit-command-line
+bindkey '\C-x\C-e' edit-command-line