From a41577d74462ae1cbcb086dd0241111ff1abe656 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 1 Oct 2010 00:38:41 +0200 Subject: vim_mode: Remove implemented todo. --- vim-mode/vim_mode.pl | 1 - 1 file changed, 1 deletion(-) (limited to 'vim-mode') diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 28a6383..b484b87 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -30,7 +30,6 @@ # * Window switching (:b) # * Tab completion of window(-item) names # * non-sequential matches(?) -# * additional statusbar-item for showing matches # # * use irssi settings for some of the features # * Done: -- cgit v1.2.3 From 64127c970fea1f7f8caa7986154aafa5cb36a064 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 1 Oct 2010 00:48:56 +0200 Subject: vim_mode: Add s. --- vim-mode/vim_mode.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'vim-mode') diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index b484b87..c0dee6a 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -6,7 +6,7 @@ # * cursor motion with: h l 0 ^ $ # * history motion with j k # * cursor word motion with: w b e W B E -# * change/delete: c d C D +# * change/delete: c d C D s # * delete at cursor: x # * replace at cursor: r # * Insert mode at pos: i a @@ -1218,6 +1218,12 @@ sub handle_command_cmd { $movement .= $char; } + # s is an alias for cl. + if (!$movement and !$operator and $char eq 's') { + print "Changing s to cl" if DEBUG; + $char = 'l'; + $operator = 'c'; + } # S is an alias for cc. if (!$movement and !$operator and $char eq 'S') { print "Changing S to cc" if DEBUG; -- cgit v1.2.3 From 90c9b37ba4cef2b4aaa7fd47fe28a32ec7edc7c3 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 1 Oct 2010 00:52:34 +0200 Subject: vim_mode: Document ; and . --- vim-mode/vim_mode.pl | 1 + 1 file changed, 1 insertion(+) (limited to 'vim-mode') diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index c0dee6a..4ce53f6 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -15,6 +15,7 @@ # * yank and paste: y p P # * switch case: ~ # * repeat change: . +# * repeat ftFT: ; , # * change/change/yank line: cc dd yy S # * Combinations like in Vi, e.g. d5fx # * window selection: :b, :b#, :b -- cgit v1.2.3 From 64ecf5ca769f74266d8c5a1bdf577cf4645a1985 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 1 Oct 2010 00:59:33 +0200 Subject: vim_mode: Fix esc in ex mode leaving the prompt unchanged. --- vim-mode/vim_mode.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vim-mode') diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 4ce53f6..fe7fb58 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -1402,7 +1402,6 @@ sub handle_command_ex { } elsif ($key == 10) { print "Run ex-mode command" if DEBUG; cmd_ex_command(); - _set_prompt(''); @ex_buf = (); _update_mode(M_CMD); @@ -1621,6 +1620,9 @@ sub _update_mode { # It's necessary when pressing enter. } elsif ($mode == M_CMD and $new_mode == M_INS) { $last->{char} = 'i'; + # Make sure prompt is cleared when leaving ex mode. + } elsif ($mode == M_EX and $new_mode != M_EX) { + _set_prompt(''); } $mode = $new_mode; -- cgit v1.2.3 From aaf88d8ffe11e65edc855676da135b49f34bd829 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 1 Oct 2010 01:05:41 +0200 Subject: vim_mode: Add :ls and :buffers. --- vim-mode/vim_mode.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vim-mode') diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index fe7fb58..cb2a182 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -958,6 +958,9 @@ sub cmd_ex_command { $active_window->print("register $key: $registers->{$key}"); } } + # :ls and :buffers + } elsif ($arg_str eq 'ls' or $arg_str eq 'buffers') { + Irssi::command('window list'); } } -- cgit v1.2.3 From 353aa8969ed5677c057b2670bf7178a97665fbb5 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 1 Oct 2010 01:27:42 +0200 Subject: vim_mode: Add :bn :bp. --- vim-mode/vim_mode.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'vim-mode') diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index cb2a182..f0ad409 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -18,7 +18,7 @@ # * repeat ftFT: ; , # * change/change/yank line: cc dd yy S # * Combinations like in Vi, e.g. d5fx -# * window selection: :b, :b#, :b +# * window selection: :b, :b#, :b :bn :bp # # * special registers: "* "+ (contain irssi's cut-buffer) # @@ -914,7 +914,13 @@ sub cmd_ex_command { print "New line is: $line" if DEBUG; _input($line); - + # :bn + } elsif ($arg_str eq 'bn') { + Irssi::command('window next'); + # :bp + } elsif ($arg_str eq 'bp') { + Irssi::command('window previous'); + # :b[buffer] {args} } elsif ($arg_str =~ m|^b(?:uffer)?\s*(.+)$|) { my $window; my $item; -- cgit v1.2.3