From 9fdaf81e05d7cb799bfc24a76b14134a51ce785d Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 29 Sep 2010 17:01:39 +0200 Subject: vim_mode: Add :reg[isters] and :di[splay] ex commands. --- vim-mode/vim_mode.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'vim-mode') diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 63d51ca..6f5a70a 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -820,6 +820,21 @@ sub cmd_ex_command { $item->set_active(); } } + + # :reg[isters] {arg} and :di[splay] {arg} + } elsif ($arg_str =~ /^(?:reg(?:isters)?|di(?:splay)?)(?:\s+(.+)$)?/) { + my @regs; + if ($1) { + @regs = split //, $1 =~ s/\s+//g; + } else { + @regs = keys %$registers; + } + my $window = Irssi::active_win; + foreach my $key (sort @regs) { + if (defined $registers->{$key}) { + $window->print("register $key: $registers->{$key}"); + } + } } } -- cgit v1.2.3