VIM创建js文件时如何自动添加文件注释?

blogdaren 2014-11-05 抢沙发 1534人次

在vimrc里添加下面几行

"添加文件注释
command -nargs=0 Addreadme :call Addreadme()
function Addreadme()
call setline(1,"/**")
call append(1," * @require : none")
call append(2," * @author : someone@bluehua.org")
call append(3," * @date : " . strftime("%Y-%m-%d"))
call append(4," * @description : this is a new file ")
call append(5," */")
endf
:au BufNewFile *.js :Addreadme

版权声明:除非注明,本文由( blogdaren )原创,转载请保留文章出处。

本文链接:VIM创建js文件时如何自动添加文件注释?

发表评论:

您的昵称:
电子邮件:
个人主页:

Free Web Hosting