From 814d426679d51d0237c4e96919160796afd34039 Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Fri, 20 Feb 2015 12:22:11 -0500 Subject: [PATCH] PLUGINS: vi-mode: Added extra vim-like bindings - 'gg': go to the beginning of the buffer history - 'G': go to the end of the buffer history - 'u': properly undo multiple changes - '^R: while in normal mode re-do changes --- plugins/vi-mode/vi-mode.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh index ebf1a4666..950f69724 100644 --- a/plugins/vi-mode/vi-mode.plugin.zsh +++ b/plugins/vi-mode/vi-mode.plugin.zsh @@ -44,6 +44,12 @@ bindkey '^?' backward-delete-char bindkey '^h' backward-delete-char bindkey '^w' backward-kill-word +# Some extra vim like bindings +bindkey -a 'gg' beginning-of-buffer-or-history +bindkey -a 'G' end-of-buffer-or-history +bindkey -a 'u' undo +bindkey -a '^R' redo + # if mode indicator wasn't setup by theme, define default if [[ "$MODE_INDICATOR" == "" ]]; then MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}"