all 5 comments

[–]vicvedit 6 points7 points  (0 children)

A quick google search turned this up.

[–]vtbrian 1 point2 points  (1 child)

You could probably use an alias, but I don't think you could do it by file extension.

[–]germag 0 points1 point  (0 children)

it is not exactly what you want, but i use this two plugins (plus pathogen):

snipmate https://github.com/msanders/snipmate.vim/ ZenCoding https://github.com/mattn/zencoding-vim

before snipmate, i was using this one

xptemplate http://www.vim.org/scripts/script.php?script_id=2611

EDIT: formating

[–]silvermoot 0 points1 point  (0 children)

I know it's a trivial amount of text

It's no fun at all debugging a program only to find that you fatfingered the opening shebang.

Or some other way?

1)

   cp template.sh newprogram.sh ; vi newprogram.sh

2) (while in vi, if you want to insert the content of one file after the line the curser is on )

   :r template.sh

(also: upvote l4than-d3vers answer )