标签:bin indent 家目录 etl func cmd end tom toc
建议在用户家目录创建.vimrc文件:set ignorecase
set autoindent
set paste
autocmd BufNewFile *.sh exec ":.call SetTitle()"
func SetTitle()
if expand("%:e") == ‘sh‘
call setline(1,"#!/bin/bash")
call setline(2,"#***********************************************")
call setline(3,"#Author: Tom")
call setline(4,"#Mail: 123456789@qq.com")
call setline(5,"#Version: 1.0")
call setline(6,"#Date: ".strftime("%Y-%m-%d"))
call setline(7,"#FileName: ".expand("%"))
call setline(8,"#Description: The test script")
call setline(9,"#***********************************************")
call setline(10,"")
endif
endfunc
autocmd BufNewFile * normal G
标签:bin indent 家目录 etl func cmd end tom toc
原文地址:https://blog.51cto.com/14880320/2516353