diff options
author | Simon Ruderich <simon@ruderich.org> | 2010-10-08 18:40:52 +0000 |
---|---|---|
committer | Simon Ruderich <simon@ruderich.org> | 2010-10-08 18:40:52 +0000 |
commit | d736f605126e368124b3ff8ed4db5b28f83b650f (patch) | |
tree | a3b9aa831abba2b124e5ad7a2cbf60455f3b62a0 /vim-mode/vim_mode.pl | |
parent | vim_mode: Minor code cleanup. (diff) | |
download | irssi-scripts-d736f605126e368124b3ff8ed4db5b28f83b650f.tar.gz irssi-scripts-d736f605126e368124b3ff8ed4db5b28f83b650f.zip |
vim_mode: Add : to $commands_ex's {char}.
Diffstat (limited to 'vim-mode/vim_mode.pl')
-rw-r--r-- | vim-mode/vim_mode.pl | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 08d8a7c..bbc71e6 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -359,26 +359,26 @@ my $commands # All available commands in Ex-Mode. my $commands_ex = { - s => { char => 's', func => \&ex_substitute, type => C_EX }, - bnext => { char => 'bnext', func => \&ex_bnext, type => C_EX }, - bn => { char => 'bn', func => \&ex_bnext, type => C_EX }, - bprev => { char => 'bprev', func => \&ex_bprev, type => C_EX }, - bp => { char => 'bp', func => \&ex_bprev, type => C_EX }, - bdelete => { char => 'bdelete', func => \&ex_bdelete, type => C_EX }, - bd => { char => 'bd', func => \&ex_bdelete, type => C_EX }, - buffer => { char => 'buffer', func => \&ex_buffer, type => C_EX }, - b => { char => 'b', func => \&ex_buffer, type => C_EX }, - registers => { char => 'registers', func => \&ex_registers, type => C_EX }, - reg => { char => 'reg', func => \&ex_registers, type => C_EX }, - display => { char => 'display', func => \&ex_registers, type => C_EX }, - di => { char => 'di', func => \&ex_registers, type => C_EX }, - buffers => { char => 'buffer', func => \&ex_buffers, type => C_EX }, - ls => { char => 'ls', func => \&ex_buffers, type => C_EX }, - undolist => { char => 'undolist', func => \&ex_undolist, type => C_EX }, - undol => { char => 'undol', func => \&ex_undolist, type => C_EX }, - map => { char => 'map', func => \&ex_map, type => C_EX }, - source => { char => 'source', func => \&ex_source, type => C_EX }, - so => { char => 'so', func => \&ex_source, type => C_EX }, + s => { char => ':s', func => \&ex_substitute, type => C_EX }, + bnext => { char => ':bnext', func => \&ex_bnext, type => C_EX }, + bn => { char => ':bn', func => \&ex_bnext, type => C_EX }, + bprev => { char => ':bprev', func => \&ex_bprev, type => C_EX }, + bp => { char => ':bp', func => \&ex_bprev, type => C_EX }, + bdelete => { char => ':bdelete', func => \&ex_bdelete, type => C_EX }, + bd => { char => ':bd', func => \&ex_bdelete, type => C_EX }, + buffer => { char => ':buffer', func => \&ex_buffer, type => C_EX }, + b => { char => ':b', func => \&ex_buffer, type => C_EX }, + registers => { char => ':registers', func => \&ex_registers, type => C_EX }, + reg => { char => ':reg', func => \&ex_registers, type => C_EX }, + display => { char => ':display', func => \&ex_registers, type => C_EX }, + di => { char => ':di', func => \&ex_registers, type => C_EX }, + buffers => { char => ':buffer', func => \&ex_buffers, type => C_EX }, + ls => { char => ':ls', func => \&ex_buffers, type => C_EX }, + undolist => { char => ':undolist', func => \&ex_undolist, type => C_EX }, + undol => { char => ':undol', func => \&ex_undolist, type => C_EX }, + map => { char => ':map', func => \&ex_map, type => C_EX }, + source => { char => ':source', func => \&ex_source, type => C_EX }, + so => { char => ':so', func => \&ex_source, type => C_EX }, }; # MAPPINGS @@ -1613,12 +1613,8 @@ sub ex_map { my $cmd = $map->{cmd}; if (defined $cmd) { next if $map->{char} eq $cmd->{char}; # skip default mappings - - my $cmdc = $cmd->{char}; - if ($cmd->{type} == C_EX) { - $cmdc = ":$cmdc"; - } - $active_window->print(sprintf "%-15s %s", $map->{char}, $cmdc); + $active_window->print(sprintf "%-15s %s", $map->{char}, + $cmd->{char}); } } } else { |