summaryrefslogtreecommitdiff
path: root/usr.bin/vi/perl_api/nviperl.pod
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-11-26 22:49:10 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-11-26 22:49:10 +0000
commitae8a234af8879e97f27622bf3af2202b850b82c3 (patch)
treeae8b4c98914ed60402c7db26b33a4899bfc5c4e4 /usr.bin/vi/perl_api/nviperl.pod
parent3eb6c5a66b1af6fba5c9f450d1e602f3ea85256b (diff)
o Update README files etc. from nvi-1.79 so they have the correct info
o make port.h empty since we there is nothing we lack o include <sys/param.h>, not <sys/types.h> in files that use MIN/MAX macros o add perl api support since we have libperl (off by default)
Diffstat (limited to 'usr.bin/vi/perl_api/nviperl.pod')
-rw-r--r--usr.bin/vi/perl_api/nviperl.pod43
1 files changed, 43 insertions, 0 deletions
diff --git a/usr.bin/vi/perl_api/nviperl.pod b/usr.bin/vi/perl_api/nviperl.pod
new file mode 100644
index 00000000000..43850d8b636
--- /dev/null
+++ b/usr.bin/vi/perl_api/nviperl.pod
@@ -0,0 +1,43 @@
+=head1 NAME
+
+nviperl - nvi with embedded perl
+
+=head1 SYNOPSIS
+
+ :perl require 'wc.pl'
+ :perl wc
+ :,$perldo $_=reverse($_)
+
+=head1 DESCRIPTION
+
+nvi with embedded perl allows you to run perl commands from within nvi.
+Two additional commands are made available when you enable the perl
+interpreter:
+
+=over 8
+
+=item * perl cmd
+
+The perl command passes the specified commands to the perl interpreter.
+The C<$VI::ScreenId>, C<$VI::StartLine> and C<$VI::StopLine> are set.
+To find out how to maniplulate the nvi screens, see L<VI>.
+
+=item * perldo cmd
+
+The perldo command runs the specified commands on each line of the range
+(every line of the file if no range specified). Before running the
+command the line is copied into $_. If the command returns a true value
+the line is replaced by the new value of $_.
+
+The perldo commando does B<not> set the C<VI> variables. (If you think
+this is a bad idea, tell me.)
+
+=back
+
+=head1 SEE ALSO
+
+L<VI>
+
+=head1 AUTHOR
+
+Sven Verdoolaege <skimo@dns.ufsia.ac.be>