From d2d067d274ebc9a20b40d55442f47d78b8aee2e7 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 4 Oct 2010 16:31:01 +0200 Subject: vim_mode: Add gg, moves to oldest history line. --- vim-mode/vim_mode.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'vim-mode/vim_mode.pl') diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 2a6edaa..09710eb 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -15,7 +15,8 @@ # /set vim_mode_cmd_seq j allows to use jj as Escape (any other character # can be used as well). # * Cursor motion: h l 0 ^ $ f t F T -# * History motion: j k G +# * History motion: j k gg G +# gg moves to the oldest (first) history line. # G without a count moves to the current input line, with a count it goes to # the count-th history line (1 is the oldest). # * Cursor word motion: w b ge e W gE B E @@ -1229,7 +1230,12 @@ sub cmd_movement_g { } else { $pos = length($input) - $pos - 1; } + # gg + } elsif ($char eq 'g') { + cmd_movement_G(1, $pos, $repeat); + $pos = undef; } + return (undef, $pos); } -- cgit v1.2.3