From 630063efe4d3177c77b1cb9f38974a0dc4b59372 Mon Sep 17 00:00:00 2001 From: Yan Pritzker Date: Tue, 13 Nov 2012 13:49:01 -0600 Subject: [PATCH] Bring back keybindings to enable vim mode and ctrl-R [Fix #212] This reverts commit 686e8d706fedb667c2b905564b79d7daec7e0e96. --- zsh/key-bindings.zsh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 zsh/key-bindings.zsh diff --git a/zsh/key-bindings.zsh b/zsh/key-bindings.zsh new file mode 100644 index 0000000..6612910 --- /dev/null +++ b/zsh/key-bindings.zsh @@ -0,0 +1,13 @@ +# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html +# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Zle-Builtins +# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Standard-Widgets + +bindkey -v # Use vi key bindings + +bindkey -s '\el' 'ls\n' # [Esc-l] - run command: ls +bindkey -s '\e.' '..\n' # [Esc-.] - run command: .. (up directory) +bindkey '^r' history-incremental-search-backward # [Ctrl-r] - Search backward incrementally for a specified string. The string may begin with ^ to anchor the search to the beginning of the line. + +# emacs style +bindkey '^a' beginning-of-line +bindkey '^e' end-of-line