快速生成脚本开头的版本注释信息

[root@localhost ~]# vim ~/.vimrc

[root@localhost ~]# cat ~/.vimrc
autocmd BufNewFile *.py,*.cc,*.sh,*.java exec ":call SetTitle()"

func SetTitle()
	if expand("%:e") == 'sh'
		call setline(1,"#!/bin/bash")
		call setline(2,"#########################################")
		call setline(3,"# File Name:".expand("%"))
		call setline(4,"# Version: V1.0")
		call setline(5,"# Author:Shen QL")
		call setline(6,"# Email:[email protected]")
		call setline(7,"# Organization:")
		call setline(8,"# Create Time:".strftime("%F %T"))
		call setline(9,"# Description:")
		call setline(10,"#########################################")
		call setline(11,"")
	endif
endfunc

效果:

快速生成脚本开头的版本注释信息_第1张图片

你可能感兴趣的:(excel)