Editplus自動補齊代碼功能

來源:互聯網
上載者:User

用PHP也有一段時間了,前後用過編輯器EditPlus、Eclipse for PHP、zend studio等,用的最順手的還算是Editplus了。不過用Editplus編輯php沒有自動補齊代碼的功能。有時就不太方便。那麼如何?自動補齊功能呢?

 

其實在EditPlus目錄下有.acp 檔案,這種檔案就是自動補齊代碼的檔案。一般Editplus安裝好後有java.acp 、 perl.acp就沒有php的。

這時候先在Editplus目錄下建一個檔案php.acp , 然後開啟Editplus,依照菜單 工具->喜好設定->文法 ,然後選擇php,然後匯入php.acp檔案,

 

 

接下來就是對php.acp檔案進行編輯了。

細心的朋友會注意到,可以拿java.acp檔案來參考編寫php.acp內容,我也是這麼做的。於是開啟java.acp檔案。發現自動補齊代碼的格式就是:

#T=if
if (^!)
{
}

該內容表示輸入if然後按空格,就會輸出

if (^!)
{
}

^!表示自動補齊代碼後的游標所處的位置。

 

於是在php.acp裡輸入內容:

#TITLE=PHP
; EditPlus Auto-completion file v1.0 written by ES-Computing.
; This file is provided as a default auto-completion file for PHP.

#CASE=y

#T=if
if (^!)
{
}
#

 

儲存,重新啟動Editplus,在php檔案裡輸入if 加空格,就能看到效果了。

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.