IntelliJ IDEA - Live template:
可以將常寫又重覆性高的code,寫成template,以快捷鍵呼叫並套用,相當實用的功能。可以幫助開發者省下撰寫冗長程式碼時間。
以i18n例,
File-> Settings-> Live templates -> Add..
出現以下視窗,並key-in以下內容:
確認ok後,apply,
編輯網頁時,輸入 i18n 並按下ctrl+j,就會出現對應的template了! 很方便~
資料參考 http://blogs.jetbrains.com/idea/2006/03/defining-a-live-template-for-null-check/
全站熱搜
留言列表