/usr/share/vile/perl/plugins.pl is in vile-common 9.8s-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | # $Header: /usr/build/vile/vile/perl/RCS/plugins.pl,v 1.7 2014/01/28 21:37:40 tom Exp $
# (see dir.doc)
package plugins;
use strict;
our $RPM_Provides = 'plugins.pl perl(plugins.pl)';
sub gzip {
my ($file) = @_;
my ( $cb, $line );
open( GZIP, "gunzip -c $file |" ) || do { print "$!\n"; return 0; };
foreach $cb ( Vile::buffers() ) {
if ( $cb->buffername eq "<gzip-viewer>" ) {
Vile->current_buffer($cb);
$cb->setregion( 1, '$$' )->attribute("normal")->delete;
last;
}
}
$cb = $Vile::current_buffer;
if ( $cb->buffername ne "<gzip-viewer>" ) {
$cb = new Vile::Buffer;
$cb->buffername("<gzip-viewer>");
Vile->current_buffer($cb);
$cb->set( "view", 1 );
$cb->set( "readonly", 1 );
$cb->set( "cfilname", $file );
$cb->unmark->dot('$$');
}
while ( $line = <GZIP> ) { print $cb $line; }
close(GZIP);
$cb->unmark()->dot( 1, 0 );
Vile::update();
return 1;
}
1;
__DATA__
=head1 NAME
plugins - additional perl module for vile
=head1 SYNOPSIS
use plugins;
plugins::gzip("filename");
=head1 DESCRIPTION
The B<plugins> module is used by the B<mime> module to display a file according
to this MIME-type in vile:
x-vile-flags=plugin
=head1 AUTHOR
Kuntal Daftary
=cut
|