9 autocmd BufNewFile *.sh, exec ":call SetTitle()"
10 let $auathor_name="tomshen"
11 let $author_email="768047936@qq.com"
12
13 function SetTitle( )
14 if &filetype == 'sh'
15 call setline(1,"############################################################################################## ##############")
16 call append(line("."), "\# File Name: " .expand("%"))
17 call append(line(".")+1, "\# Author:" .$author_name)
18 call append(line(".")+2, "\# Created Time: " .strftime("%c"))
19 call append(line(".")+4, "\=================================================================================== =================")
20 call append(line(".")+5, "\#!/bin/bash")
21 call append(line(".")+6, "")
22 call setline(1,"\############################################################################################# ##############")
23 endif
24 endfunction