[root@m01 ~]# cat ~/.vimrc
set ts=4
set expandtab
set ignorecase
autocmd BufNewFile *.sh exec ":call SetTitle()"
func SetTitle()
if expand("%:e") == 'sh'
call setline(1,"#!/bin/bash")
call setline(2,"#")
call setline(3,"#****************************************************************************************")
call setline(4,"#Author: linfan")
call setline(5,"#Emile: 16601500035@163.com")
call setline(6,"#FileName: ".expand("%"))
call setline(7,"#Date: ".strftime("%Y-%m-%d"))
call setline(8,"#Description: ")
call setline(9,"#****************************************************************************************")
call setline(10,"")
endif
endfunc
autocmd BufNewFile * normal G
08-20
173
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-18
991
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
01-14
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)