[root@Centos ~]# vim .vimrc vim
set ignorecase set cursorline set autoindent autocmd BufNewFile *.sh exec ":call SetTitle()" func SetTitle()
if expand("%:e") == 'sh'bash
call setline(1,"#!/bin/bash") call setline(2,"#") callsetline(3,"#********************************************************************") call setline(4,"#Author:------------------------------------------------- w") call setline(5,"#QQ:------------------------------------------------------1****") call setline(6,"#Date:--------------------------".strftime("%Y-%m-%d")) call setline(7,"#FileName:----------------------------------- ".expand("%")) call setline(8,"#URL:--------------------------- http://www.123456.com") call setline(9,"#Description:----------------------------------- The test script") call setline(10,"#Copyright (C-----".strftime("%Y")." All rights reserved") callsetline(11,"#********************************************************************") call setline(12,"") endif endfunc autocmd BufNewFile * normal G 以上「-」表明空格或者Tab鍵 不忘初心 砥礪前行!!!!!!!