Often write shell scripts to the brothers
often write shell script, we must have problems, how to make the header file .sh own generation, do not knock it ourselves
First, we want to write about the / etc / vimrc
execution
vim /etc/vimrc
In some of the code can be inserted inside
autocmd BufNewFile *.sh exec ":call Set()"
func Set()
call append(0,"#!/bin/bash")
call append(1,"#*********************************** ")
call append(2,"#* CreateTime " .strftime("%Y-%m-%d"))
call append(3,"#* scriptname: " .expand("%"))
call append(4,"#* email: 邮箱")
call append(5,"#* version: v0.1 ")
call append(6,"#* Author : ")
call append(7,"#*********************************** ")
endfunc
I hope for your help, thank met!