自动添加shell脚本头部信息

autocmd BufNewFile *.sh exec ":call AddTitleForShell()"
function  AddTitleForShell()
    call append(0,"#!/bin/bash")
    call append(1,"# **********************************************************")
    call append(2,"# * Author        : quanzhiqiang")
    call append(3,"# * Email         : 13145710069@163.com")
    call append(4,"# * Create time   : ".strftime("%Y-%m-%d %H:%M"))
    call append(5,"# * Filename      : ".expand("%:t"))
    call append(6,"# * Description   : ")
    call append(7,"# **********************************************************")
endfunction

  

posted @ 2019-10-27 16:03  linux——quan  阅读(869)  评论(0编辑  收藏  举报