<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
  $Id: dir.html,v 1.4 2009/12/29 11:49:13 tom Exp $
-->
<HTML>
<HEAD>
<TITLE>
Directory-Browser Perl-extension for Vile
</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rev="made" href="mailto:dickey@invisible-island.net">
<link rel="SHORTCUT ICON" href="/img/icons/vile.ico" type="image/x-icon">
</HEAD>
<BODY>
<h1 id="toplevel-id"><a name="toplevel">Directory-Browser Perl-extension for Vile</a></h1>
There is a directory browser extension for vile written with the perl interface.
<h2 id="features-id"><a name="features">Features</a></h2>
The main features of the directory browser are:
<ul>
<li>two panel display for separate listing of directories and files
<li>configurable color hilighting based on the type of the file
<li>recognizes broken symlinks
<li>hypertext based directory traversal and file viewing
<li>mime aware capabilities to view files using appropriate applications
<li>plugins extension to the mime library to allow to view certain files
   within vile after passing through a vile based perl filter routine.
</ul>
<h2 id="details-id"><a name="details">Details</a></h2>
The package contains the following three perl files.
<ul>
<li>directory.pl
<li>mime.pl
<li>plugins.pl
</ul><p>
Detailed pod documentation is contained within each file.
<p>
The package also contains sample files for:
<ul>
<li>~/.vile/mailcap
<li>~/.vile/mime.types
</ul>
<h2 id="gettingstarted-id"><a name="gettingstarted">Getting Started</a></h2>
To get started off without reading the documentation:
<ol>
<li>put all the three perl files in ~/.vile/perl

<li>put the sample mailcap and mime.types files in ~/.vile

<li>put the following lines in your .vilerc
<!--{{atr2html--><p style="font-family: monospace;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong><font color="#008080">22</font></strong>&nbsp;<strong><font color="#000080">store-macro</font></strong><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">~force</font>&nbsp;<strong><font color="#000080">execute-hypertext-command</font></strong><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">~if</font>&nbsp;<font color="#008080">&amp;not</font>&nbsp;<font color="#008080">$status</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">~force</font>&nbsp;<strong><font color="#000080">forward-character-to-eol</font></strong><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">~endif</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">~endm</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong><font color="#000080">bind-key</font></strong>&nbsp;<strong><font color="#000080">execute-macro-22</font></strong>&nbsp;<font color="#800080">^M</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong><font color="#000080">perl</font></strong>&nbsp;<font color="#800080">"use&nbsp;directory"</font><br>
<!--atr2html}}--></p>

<li>open up vile and type
<!--{{atr2html--><p style="font-family: monospace;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:<strong><font color="#000080">directory</font></strong><br>
<!--atr2html}}--></p>

<li>Press &lt;RETURN> on directory name to change to that directory and on the file
   name to view that file.
</ol>

<h2 id="credits-id"><a name="credits">Credits</a></h2>
The perl directory-browser script was written by Kuntal M Daftary in 1998.
Kevin Buettner provided help with bug-fixes.
