シェル開始コメントテンプレート

ファイル /etc/vimrc を変更します

最後に追加するだけです

set ignorecase 
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:quanheng")
call setline(6, "# Organization:www.quanheng77.top")
call setline(7, "# Desc:")
call setline(8,"##############################################################")
endif
endfunc

おすすめ

転載: blog.csdn.net/m0_46213587/article/details/127248672