From 4014236fa515fe3d4fabb1e62a211636b276fb7d Mon Sep 17 00:00:00 2001 From: Michael Komitee Date: Sat, 8 Jan 2011 23:20:38 -0500 Subject: [PATCH] Customize bindings for vi-mode --- custom/vi-mode.zsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 custom/vi-mode.zsh diff --git a/custom/vi-mode.zsh b/custom/vi-mode.zsh new file mode 100644 index 000000000..990323e58 --- /dev/null +++ b/custom/vi-mode.zsh @@ -0,0 +1,12 @@ +# In vi-mode, map v to edit the command line +autoload edit-command-line +zle -N edit-command-line +bindkey -M vicmd v edit-command-line + +# Yes, we're in vi-mode, but ^r is a habit +bindkey -M viins "^r" vi-history-search-backward +bindkey -M vicmd "^r" vi-history-search-backward + +# Sometimes its useful to find in insert mode +bindkey -M viins "^F" vi-find-next-char +bindkey -M viins "^P" vi-find-prev-char