From 8ee97fe7c7084b6bbca2581d9d1e430fb32b1111 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 26 Sep 2010 23:19:20 +0200 Subject: vim_mode: Add C D. --- vim-mode/vim_mode.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'vim-mode') diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 36bc6e0..3641d0a 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -6,7 +6,7 @@ # * cursor motion with: h, l # * history motion with j,k (only supported on Irssi versions > 0.8.13) # * cursor word motion with: w, b, e -# * change/delete: c d +# * change/delete: c d C D # * delete at cursor: x # * Insert mode at pos: i, a # * Insert mode at start: I @@ -19,7 +19,6 @@ # # TODO: # * /,?,n to search through history (like history_search.pl) -# * C,D = c$, d$, # * S = 0c$ # * ^ (first non-whitespace on line) # * Fix I = ^i @@ -185,6 +184,9 @@ my $movements # paste 'p' => { func => \&cmd_movement_p }, 'P' => { func => \&cmd_movement_P }, + # to end of line + 'C' => { func => \&cmd_movement_dollar }, + 'D' => { func => \&cmd_movement_dollar }, # misc '~' => { func => \&cmd_movement_tilde }, '.' => {}, @@ -731,6 +733,12 @@ sub handle_command { } elsif ($char eq '.') { $skip = 1; } + # C and D force the matching operator + if ($char eq 'C') { + $operator = 'c'; + } elsif ($char eq 'D') { + $operator = 'd'; + } } if ($skip) { -- cgit v1.2.3