On Tue, Jan 25, 2000 at 12:10:30PM +0000, kevin lyda wrote:
> any idea if it's possible to script vim to automagically add the line
>> #!/usr/bin/perl
>> any time you type vi foo.pl iff foo.pl doesn't exist? same q for
> #!/bin/sh and foo.sh.
Perhaps easiest to do something like in your .bashrc:
function vi ()
{
if [ ! -f $1 ] ; then
case $1 in
*.pl
echo '#!'`which perl` >> $1 ;;
*.sh
echo '#!'`which sh` >> $1 ;;
esac
fi
`which vi` $*
}
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!