vimrc配置-新建文件时自动生成文件头
auto add file header
autocmd BufNewFile *.py 0r /home/zxkletters/.vim/vim_template/vim_header_for_python
autocmd BufNewFile *.py ks|call FileName()|'s
autocmd BufNewFile *.py ks|call CreatedTime()|'s
autocmd BufNewFile *.sh 0r /home/zxkletters/.vim/vim_template/vim_header_for_sh
autocmd BufNewFile *.sh ks|call FileName()|'s
autocmd BufNewFile *.sh ks|call CreatedTime()|'s
fun FileName()
let l = 10
else
endif
endfun
fun CreatedTime()
let l = 10
else
endif
endfun
/home/zxkletters/.vim/vim_template/vim_header_for_python文件内容:
/home/zxkletters/.vim/vim_template/vim_header_for_sh文件内容: