In part of my talk on Thursday, I showed how I do filetype templates in
vim. Several people asked for a copy.
Add the following line in your .vimrc
autocmd BufNewFile * silent! 0r ~/.vim/templates/%:e.template
and create the directory ~/.vim/templates.
When creating a new file, this will cause vim to look in the template
directory for a file named {file_extension}.template and load it first.
Here's my template pl.template
-------------------
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
-------------------
Have more vim fun.
G. Wade
--
A product's only late once, but it can suck forever.
-- Ben Spees, Ambrosia Software
_______________________________________________
Houston mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/houston
Website: http://houston.pm.org/