VIM 添加註釋的部分配置,vim添加註釋部分

來源:互聯網
上載者:User

VIM 添加註釋的部分配置,vim添加註釋部分

 1 "以下為我的vim的部分配置 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 "從這開始是我所說的 8 "在當前行的上面添加函數的注釋 9 map <F5> ms:call AddNotes()<cr>'s10 function AddNotes()11     call append(line(".")-1,"/**")12     call append(line(".")-1," * @description\t")13     "多個人使用的話給以給成這樣,我就自己用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\t\t$iVar")18     call append(line(".")-1," * @param\tstring\t\t$sVar")19     call append(line(".")-1," * @param\tarray\t\t$aVar")20     call append(line(".")-1," * @return\t")21     call append(line(".")-1," **/")22     normal gg=G23 endfunction24 25 "添加標頭檔注釋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  

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.