Intellj Idea 快捷鍵入門

Intellj IDEA快捷鍵入門

時間: 2019/11/29

系統: Win10系統html

版本 :Intellj Idea 2018.3

背景:ide

入手Intellj idea 兩個月了,總結一下一些經常使用的快捷鍵,防止遺忘
內容:
1.自動補全

最基本的的有sout,psvm,fori等自動生成System.out.println,public static void main,for().idea

strList.for+tab 生成for(String str:strList)code

快捷鍵1:Ctrl+Space(空格),基本代碼補全:類名|方法名|變量名,即把未完成的單詞htm

補全場景:  StringBu  ---> StringBuffer

​ 參考:http://www.javashuo.com/article/p-ueuaydpf-mo.html對象

快捷鍵2:Ctrl+Shift+Space,(從左到右)根據類型智能補全代碼blog

補全場景:  StringBuffer buffer = new

​ 參考:http://www.javashuo.com/article/p-tuxwwmea-mo.htmlget

快捷鍵3:Ctrl+Shift+Enter ,根據代碼提示智能完成本行代碼,以分號結束string

補全場景:  new StringBuff  --->   new StringBuffer( );

快捷鍵4:Ctrl+Alt+V ,(從右向左)自動補全返回值類型和對象hash

補全場景:new StringBuffer() --->  StringBuffer sb = new StringBuffer();

快捷鍵5:Alt+Insert,智能生成getter,setter,tostring,hashcode/equals

快捷鍵6:Ctrl+Alt+T,智能生成環繞代碼即:在選中的代碼外部,生成包圍的if-else,try-catch,for循環,synchronized代碼塊

相關文章
相關標籤/搜索