diff options
| author | Teddy Wing | 2017-12-17 01:31:45 +0100 |
|---|---|---|
| committer | Teddy Wing | 2017-12-17 01:31:45 +0100 |
| commit | 06eab3f18d685aeb1729ec029f922603a61eb976 (patch) | |
| tree | aae469b2dd6251796c2e691cc4d2823cbeef9696 | |
| parent | c1144625d59dd269838974b63cec400ca1ac8eb8 (diff) | |
| download | irssi-vimput-06eab3f18d685aeb1729ec029f922603a61eb976.tar.bz2 | |
Add help
Irssi help accessible from `/help vimput`. Describes the command and
lets users know that they should bind a shortcut in order to use the
plugin.
| -rw-r--r-- | vimput.pl | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -189,6 +189,33 @@ sub is_ok_message { } +Irssi::command_bind('help', sub { + if ($_[0] !~ /^vimput\s*$/) { + return; + } + + my $help = <<HELP; +%9Syntax:%9 + +VIMPUT + +%9Details:%9 + + Opens the current input line in a new Tmux split in Vim. When the Vim + buffer is written, Irssi's prompt will be updated from the contents of the + buffer. + + %9Note:%9 In order to use this script, you'll have to make a key binding to + Vimput. For example: + + /BIND ^X command vimput +HELP + + Irssi::print($help, MSGLEVEL_CLIENTCRAP); + Irssi::signal_stop(); +}); + + Irssi::command_bind('vimput' => sub { write_input(Irssi::parse_special('$L', undef, 0)); open_tmux_and_update_input_line_when_finished(); |
