function! TitleInsert()
call setline(1,"Title:")
call setline(2,"Date: ". strftime("%Y-%m-%d %H:%M:%S"))
call setline(3,"Modified: ")
"call setline(3,"Modified: ". strftime("%Y-%m-%d %H:%M:%S"))
call setline(4,"Category: ")
call setline(5,"Tags: ")
call setline(6,"Author:天地一沙鸥")
endfunction
"call append(4,"Category")
"setline 是直接设置指定行的内容
"append 是在插入行
function! TitleModify()
"保存时间改变
call setline(3,"Modified: ". strftime("%Y-%m-%d %H:%M:%S"))
endfunction
autocmd BufNewFile *.blog,*.cal ks|call TitleInsert()|'s
autocmd FileWritePost,BufWrite *.blog,*.cal ks|call TitleModify()|'s