VIM创建js文件时如何自动添加文件注释?
在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 )原创,转载请保留文章出处。
发表评论: