diff options
| author | Teddy Wing | 2017-12-17 01:42:16 +0100 | 
|---|---|---|
| committer | Teddy Wing | 2017-12-17 01:42:16 +0100 | 
| commit | 84ab68f96634cc29eb63a266a30b3147fec835e5 (patch) | |
| tree | f562fc5608b158491c8fb8d406d02c24a2b38b93 /vimput.pl | |
| parent | 06eab3f18d685aeb1729ec029f922603a61eb976 (diff) | |
| download | irssi-vimput-84ab68f96634cc29eb63a266a30b3147fec835e5.tar.bz2 | |
Remove `vimput` Irssi command
It doesn't really make sense to have a `/vimput` command since the
script modifies the input line. It's intended to be run on an existing
input line, not have you enter a command on the prompt.
Instead, change the command to a normal subroutine and instruct users in
the 'help' to create a binding to the Perl function in order to execute
the script.
Thanks to tmux-nicklist-portable for this idea:
https://github.com/irssi/scripts.irssi.org/blob/a0e86203562bac00ecc271842d6f4b238dae1c81/scripts/tmux-nicklist-portable.pl
Diffstat (limited to 'vimput.pl')
| -rw-r--r-- | vimput.pl | 12 | 
1 files changed, 4 insertions, 8 deletions
| @@ -195,10 +195,6 @@ Irssi::command_bind('help', sub {  	}  	my $help = <<HELP; -%9Syntax:%9 - -VIMPUT -  %9Details:%9      Opens the current input line in a new Tmux split in Vim. When the Vim @@ -206,9 +202,9 @@ VIMPUT      buffer.      %9Note:%9 In order to use this script, you'll have to make a key binding to -    Vimput. For example: +    Vimput. For example, to bind Ctrl-X: -        /BIND ^X command vimput +        /BIND ^X command script exec Irssi::Script::vimput::vimput  HELP  	Irssi::print($help, MSGLEVEL_CLIENTCRAP); @@ -216,7 +212,7 @@ HELP  }); -Irssi::command_bind('vimput' => sub { +sub vimput {  	write_input(Irssi::parse_special('$L', undef, 0));  	open_tmux_and_update_input_line_when_finished(); -}); +} | 
