aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode/vim_mode.pl
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vim-mode/vim_mode.pl12
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) {