diff options
Diffstat (limited to 'vim-mode')
-rw-r--r-- | vim-mode/vim_mode.pl | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 4f071c4..bad556e 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -487,8 +487,6 @@ my $commands_ex type => C_EX }, sprev => { char => ':serverprev', func => \&ex_server_prev, type => C_EX }, - exinsert => { char => ':exins', func => \&ex_insert_str, - type => C_EX }, }; @@ -1623,18 +1621,6 @@ sub _fix_input_pos { # EX MODE COMMANDS -sub ex_insert { - my ($arg_str, $count) = @_; - $count = defined $count ? $count : 1; - print "EX-Inserting: $arg_str cnt: $count" if DEBUG; - - push @ex_buf, split '', $arg_str; - _set_prompt(':' . join '', @ex_buf); - _update_mode(M_EX); - - Irssi::statusbar_items_redraw("vim_windows"); - -} sub cmd_ex_command { my $arg_str = join '', @ex_buf; @@ -1951,8 +1937,8 @@ sub ex_map { # Add new mapping. my $command; - - if (index($rhs, ':') == 0) { # Ex-mode command + # Ex-mode command + if (index($rhs, ':') == 0) { $rhs =~ /^:(\S+)(\s.+)?$/; if (not exists $commands_ex->{$1}) { return _warn_ex('map', "$rhs not found"); @@ -1962,21 +1948,8 @@ sub ex_map { type => C_EX, }; } - } elsif (index($rhs, '#') == 0) { # partial ex-mode command (insert) - if ($rhs =~ /^#(.+)/) { - my $parsed_rhs = _parse_mapping($1); - $command = { - char => $parsed_rhs, - func => \&ex_insert, - type => C_EX, - }; - } else { - _warn_ex('invalid partial ex-mode mapping ' . $rhs); - } - } elsif (index($rhs, '/') == 0) { # Irssi command - # TODO: check for $cmdchars instead of just /? - # except when it interferes with : for ex. - + # Irssi command + } elsif (index($rhs, '/') == 0) { $command = { char => $rhs, func => substr($rhs, 1), type => C_IRSSI, |