diff options
author | Simon Ruderich <simon@ruderich.org> | 2010-09-26 21:19:20 +0000 |
---|---|---|
committer | Simon Ruderich <simon@ruderich.org> | 2010-09-26 21:19:45 +0000 |
commit | 8ee97fe7c7084b6bbca2581d9d1e430fb32b1111 (patch) | |
tree | a1509a89caf8b8b88962dd433ed641e04027370c | |
parent | vim_mode: . doesn't repeat movements now. (diff) | |
download | irssi-scripts-8ee97fe7c7084b6bbca2581d9d1e430fb32b1111.tar.gz irssi-scripts-8ee97fe7c7084b6bbca2581d9d1e430fb32b1111.zip |
vim_mode: Add C D.
Diffstat (limited to '')
-rw-r--r-- | vim-mode/vim_mode.pl | 12 |
1 files changed, 10 insertions, 2 deletions
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) { |