IDEA快捷鍵總結大全

2021-10-04 05:08:14 字數 2601 閱讀 3732

psvm + tab 生成main方法

sout + tab 生成輸出語句

ctrl+x / ctrl + y 刪除一行

ctrl+d 複製一行

ctrl+/ 或 ctrl+shift+/ 注釋**

ctrl + z 撤銷

ctrl + shift + z 取消撤銷

ctrl + c 複製

ctrl + v 貼上

ctrl + o 重寫方法

ctrl + i 實現方法

ctr + shift + u 大小寫轉化

ctrl + shift + j 整合兩行為一行

ctrl + shift + space 自動補全**

alt + 回車 匯入包,自動修正

alt + / **提示

alt + insert 生成**(如get,set方法,建構函式等)

ctrl + alt + l 格式化**

ctrl + alt + i 自動縮排

ctrl + alt + t 生成try catch

ctrl + alt + o 優化匯入的類和包

fori 生成for迴圈for (int i = 0; i< ; i++)

iter 生成增強for迴圈

itar 生成array for**塊

itit 生成iterator 迭代

itli 生成list的遍歷

itco 生成collection迭代

ctrl + f 在當前檔案中查詢

ctrl + shift + f 在整個專案或者指定視窗中查詢文字

ctrl + n 在專案中查詢類

ctrl + shift + n 查詢檔案

ctrl + r 在當前檔案進行文字替換

ctrl + shift+r 在指定視窗替換文字

ctrl + w 自動按語法選中**

ctrl + shift + w 反向自動按語法選中**

ctrl + g 定位行

ctrl+shift+backspace 跳轉到上一次編輯的位置

ctrl + alt + ←/→ 前後跳轉編輯過的地方

ctrl + shift + alt + n 查詢 變數 / 方法

alt + f7 找到你的函式或者變數或者類的所有引用到的地方

alt + f3 高亮顯示所有該選中文字,按 enter 選中下乙個,按 esc 高亮消失

f4 在當前類中查詢變數的**

ctrl + shift + f7 高亮顯示所有該選中文字,按 esc 高亮消失

雙擊shift 查詢任何內容

ctrl + f9 編譯專案

ctrl + shift + f9 編譯當前檔案

shift + f10 正常啟動

alt + shift + f10 彈出 run 的可選擇選單

shift + f9 debug模式啟動

alt + shift + f9 選擇 debug

f7 在 debug 模式下,步入,如果當前行斷點是乙個方法,則進入當前方法體內,如果該方法體還有方法,則不會進入該內嵌的方法中

shift + f7 智慧型步入

alt + shift + f7 強制步入

f8 在 debug 模式下,步過,如果當前行斷點是乙個方法,則不進入當前方法體內

shift + f8 步出

alt + shift + f8 強制步過

alt + f8 在 debug 模式下,選中檢視值

ctrl + shift + f8 檢視斷點

f9 在 debug 模式下,恢復程式執行。如果該斷點下面**還有斷點則停在下乙個斷點上

alt +f9 執行至游標的位置

ctrl + alt+ f9 強制執行至游標處

alt + f10 定位到斷點

shift + f6 重新命名

ctrl + alt + c 抽取常量

ctrl + alt + f 抽取字段

ctrl + alt + m 抽取方法

ctrl + alt + p 抽取引數

ctrl + alt + v 抽取變數

ctrl + c 複製檔名

ctrl + shift + c 複製檔案的完整路徑

ctrl + e 顯示最近開啟的檔案

ctrl + shift + e 顯示最近修改的檔案列表的彈出層

ctrl + p 方法引數提示

ctrl + q 可以看到當前方法的宣告

ctrl + alt + space 類名或介面名提示

ctrl + f12 顯示當前檔案的結構

ctrl + h 顯示當前類的結構圖

ctrl + q 顯示注釋文件資訊

連按兩次shift 彈出 search everywhere 彈出層,查詢任任內容

ctrl + [ 移動游標到當前所在**的花括號開始位置

ctrl + ] 移動游標到當前所在**的花括號結束位置

ctrl + k 版本控制提交專案,需要此專案有加入到版本控制才能夠使用

ctrl + t 版本控制更新專案,需要此專案有加入到版本控制才能夠使用

ctrl + tab 切換編輯視窗。如果在切換的過程又按delete鍵,則是關閉對應選中的視窗

IDEA快捷鍵大全

ctrl f2,停止 alt shift f9,選擇 debug alt shift f10,選擇 run ctrl shift f9,編譯 ctrl shift f10,執行 ctrl shift f8,檢視斷點 f8,步過 f7,步入 shift f7,智慧型步入 shift f8,步出 alt...

IDEA快捷鍵大全

自動 常用的有fori sout psvm tab即可生成迴圈 system.out main方法等boilerplate樣板 例如要輸入for user user users 只需輸入user.for tab 再比如,要輸入date birthday user.getbirthday 只需輸入us...

idea快捷鍵大全

ctrl z 撤銷 ctrl shift z 重做 ctrl x 剪貼 ctrl c 複製 ctrl v 貼上 ctrl y 刪除當前行 ctrl d 複製當前行 ctrl shift j 將選中的行合併成一行 ctrl n 查詢類檔案 ctrl shift n 查詢檔案 ctrl g 定位到檔案某...