summaryrefslogtreecommitdiffstats
path: root/lib/Reply/Plugin/Editor.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Reply/Plugin/Editor.pm')
-rw-r--r--lib/Reply/Plugin/Editor.pm20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Reply/Plugin/Editor.pm b/lib/Reply/Plugin/Editor.pm
index fe5c23e..e7ff91d 100644
--- a/lib/Reply/Plugin/Editor.pm
+++ b/lib/Reply/Plugin/Editor.pm
@@ -1,6 +1,7 @@
package Reply::Plugin::Editor;
use strict;
use warnings;
+# ABSTRACT: command to edit the current line in a text editor
use base 'Reply::Plugin';
@@ -8,6 +9,25 @@ use File::HomeDir;
use File::Spec;
use Proc::InvokeEditor;
+=head1 SYNOPSIS
+
+ ; .replyrc
+ [Editor]
+ editor = emacs
+
+=head1 DESCRIPTION
+
+This plugin provides the C<#e> command. It will launch your editor, and allow
+you to edit bits of code in your editor, which will then be evaluated all at
+once. The text you entered will be saved, and restored the next time you enter
+the command. Alternatively, you can pass a filename to the C<#e> command, and
+the contents of that file will be preloaded instead.
+
+The C<editor> option can be specified to provide a different editor to use,
+otherwise it will use the value of C<$ENV{VISUAL}> or C<$ENV{EDITOR}>.
+
+=cut
+
sub new {
my $class = shift;
my %opts = @_;