Hi,
thank you very much for your very helpful information. Now I have a much
better understanding of vimscript.
The following shows what I finally wrote
===
function NewZshScript()
let ts = " generated on " . strftime('%Y-%m-%d at %H:%M:%S')
let inf = expand("%") . ts
0put ='#! /usr/bin/zsh'
put ='#'
put ='# ' . inf
put ='#'
put ='pn=$1'
put ='pn=${pn##*/}'
put ='#'
endfunction
au BufNewFile *.zsh call NewZshScript()
===
First I tried 'append' but I never get that working with the line
continuations. Besides the function gives me more flexibility.
Here doc or stubs I will try when I have a bigger template.
Thank you.
--
K.D.J.