diff options
author | Simon Ruderich <simon@ruderich.org> | 2010-10-04 14:31:01 +0000 |
---|---|---|
committer | Simon Ruderich <simon@ruderich.org> | 2010-10-04 14:31:01 +0000 |
commit | d2d067d274ebc9a20b40d55442f47d78b8aee2e7 (patch) | |
tree | 1146a155b89e901fd6d5155b5d6724b4ddd3533b | |
parent | vim_mode: Add G, moves to count-th history line. (diff) | |
download | irssi-scripts-d2d067d274ebc9a20b40d55442f47d78b8aee2e7.tar.gz irssi-scripts-d2d067d274ebc9a20b40d55442f47d78b8aee2e7.zip |
vim_mode: Add gg, moves to oldest history line.
-rw-r--r-- | vim-mode/vim_mode.pl | 8 |
1 files changed, 7 insertions, 1 deletions
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 ^ $ <space> 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); } |