diff options
author | Simon Ruderich <simon@ruderich.org> | 2010-10-07 21:16:11 +0000 |
---|---|---|
committer | Simon Ruderich <simon@ruderich.org> | 2010-10-07 21:16:11 +0000 |
commit | b2bec6638cde0f2f6a64298572bafd0126bcda32 (patch) | |
tree | 52742c2579e1e080ad2da401c7aba54eb7a5a351 /vim-mode/vim_mode.pl | |
parent | vim_mode: Fix :registers' display of "+ and "*. (diff) | |
download | irssi-scripts-b2bec6638cde0f2f6a64298572bafd0126bcda32.tar.gz irssi-scripts-b2bec6638cde0f2f6a64298572bafd0126bcda32.zip |
vim_mode: Add "0, last yank.
Diffstat (limited to 'vim-mode/vim_mode.pl')
-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 134874d..52424ce 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -37,9 +37,10 @@ # * Switch case: ~ # * Repeat change: . # * Repeat ftFT: ; , -# * Registers: "a-"z "" "* "+ "_ (black hole) +# * Registers: "a-"z "" "0 "* "+ "_ (black hole) # Appending to register with "A-"Z # "" is the default yank/delete register. +# "0 contains the last yank (if no register was specified). # The special registers "* "+ contain both irssi's cut-buffer. # * Line-wise shortcuts: dd cc yy # * Shortcuts: s S C D @@ -402,6 +403,7 @@ my $register = '"'; my $registers = { '"' => '', # default register + '0' => '', # yank register '+' => '', # contains irssi's cut buffer '*' => '', # same '_' => '', # black hole register, always empty @@ -525,6 +527,10 @@ sub cmd_operator_y { } else { $registers->{$register} = $string; print "Yanked into $register: ", $registers->{$register} if DEBUG; + if ($register eq '"') { + $registers->{0} = $string; + print "Yanked into 0: ", $registers->{0} if DEBUG; + } } # Always move to the lower position. |