Add comments to VIM and comments to vim
1 "Below is part of my vim configuration 2 au FileType php call AddPHPFuncList () 3 function AddPHPFuncList () 4 set dictionary-= ~ /. Vim/php_funclist.txt dictionary + = ~ /. Vim/php_funclist.txt 5 set complete-= k complete + = k 6 endfunction 7 "from this point on is what I call 8" add function comments on the current row 9 map <F5> ms: call AddNotes () <cr> 's10 function AddNotes () 11 call append (line (". ")-1,"/** ") 12 call append (line (". ")-1," * @ description \ t ") 13" if you are using multiple users, I use 14 "let name = $ USER15" call append (line (". ")-1," * @ author \ t ". name. "\ t ". strftime ("% Y-% m-% d % H: % M") 16 call append (line (". ")-1," * @ author \ t \ zhaoyingnan \ t ". strftime ("% Y-% m-% d % H: % M") 17 call append (line (". ")-1," * @ param \ tint \ t $ iVar ") 18 call append (line (". ")-1," * @ param \ tstring \ t $ sVar ") 19 call append (line (". ")-1," * @ param \ tarray \ t $ aVar ") 20 call append (line (". ")-1," * @ return \ t ") 21 call append (line (". ")-1," **/") 22 normal gg = G23 endfunction24 25" add header file Comment 26 map <F4> ms: call AddTitle () <cr> 's27 function AddTitle () 28 call append (1, "/**") 29 call append (2, "* Description:") 30 call append (3, "* Create date :". strftime ("% Y-% m-% d % H: % M") 31 "call append (4," * Modified date :". strftime ("% Y-% m-% d % H: % M") 32 call append (4, "* Author: zhaoyingnan") 33 call append (5, "**/") 34 endfunction