IDEA快捷鍵--不斷更新版

Shift+Shift
若是你不能清楚的知道自己查找內容的類別,我們可以使用:Shift+Shift 來查找,它可以查看其中的任意文件,即使你寫了一個功能爲hello,這樣我們在java/js等等文件中都有hello,但是隻要使用這個功能還是可以快速的將它從文件夾中找到

Ctrl+Shift+F
搜索當前的目錄

查看類的繼承關係
Ctrl+H


F7
進入方法
F8
不進入方法
F9
到下一個斷點出

Ctrl+B
可以看見其中的父類以及定義的方法,還可以使用ctrl+左鍵來代替。
但是這樣的方法不能看見put方法,因此我們最好的解決方法就是使用:
Ctrl+Alt+B快捷鍵,這樣就能查找到hashmap中的put方法了!
Ctrl+Alt+B


它是用來查找類和方法在哪裏被使用的
Alt+F7

本文查找    
Ctrl+F
全局查找
Ctrl+Shift+F

查看當前類的方法列表
Ctrl+F12

自動生成返回值:(萬能補全鍵)
Alt+Enter

調出粘貼板
Ctrl+Shift+v

查看子父類的繼承關係圖:
Ctrl+H


格式化代碼:
ctrl+alt+L


根據輸入的類名查找類文件 
Ctrl + N

跳轉到指定行
Ctrl + G

插入自定義動態代碼模板 動態提示(模板)
Ctrl + J 

方法參數提示顯示
Ctrl + P  

光標所在的變量 / 類名 / 方法名等上面(也可以在提示補充的時候按),顯示文檔內容 
這個鍵不用記憶,直接鼠標放上去就ok
Ctrl + Q

前往當前光標所在的方法的父類的方法 / 接口定義 (必備)
Ctrl + U 

反撤銷
Ctrl+y

查看類的機構
Ctrl+o

方法或者變量的重構
Alt+r

大小寫轉換:
Ctrl+Shift+u


生成構造器
alt+insert

刪除當前行
ctrl+y


使用IDEA進行開發:
首先要理解IDEA中的Project和Modules,這兩者分別相當於Eclipse中的Workspace和Project


遞進式的選中:
Ctrl+w

複製光標所在行
Ctrl + D 


Ctrl + J 插入自定義動態代碼模板 
Ctrl + P 方法參數提示顯示 (必備) 
Ctrl + U 前往當前光標所在的方法的父類的方法 / 接口定義
Ctrl + B 進入光標所在的方法/變量的接口或是定義處,等效於 Ctrl + 左鍵單擊 (必備) 


版本控制專題
Ctrl + K 版本控制提交項目,需要此項目有加入到版本控制纔可用(提交到本地倉庫)
Ctrl + Shift + K 版本控制提交項目,需要此項目有加入到版本控制纔可用(提交到遠程倉庫)
Ctrl + T 版本控制更新項目,需要此項目有加入到版本控制纔可用

Ctrl + H 顯示當前類的層次結構
Ctrl + O 選擇可重寫的方法

Ctrl + I 選擇可繼承的方法
Ctrl + + 展開代碼
Ctrl + - 摺疊代碼 


Ctrl + [ 移動光標到當前所在代碼的花括號開始位置
Ctrl + ] 移動光標到當前所在代碼的花括號結束位置 

Ctrl + F1 在光標所在的錯誤代碼處顯示錯誤信息 (必備) 
Ctrl + F3 調轉到所選中的詞的下一個引用位置 (必備) 查找相似    相當於查找相似
Ctrl + F4 關閉當前編輯文件

斷點調試部分
Ctrl + F8 在 Debug 模式下,設置光標當前行爲斷點,如果當前已經是斷點則去掉斷點
Ctrl + F9 執行 Make Project 操作    相當於編譯
Ctrl + F11 選中文件 / 文件夾,使用助記符設定 / 取消書籤 (必備) 
Ctrl + F12 彈出當前文件結構層,可以在彈出的層上直接輸入,進行篩選


Ctrl + Tab 編輯窗口切換,如果在切換的過程又加按上 delete,則是關閉對應選中的窗口
Ctrl + End 跳到文件尾
Ctrl + Home 跳到文件頭

Ctrl + Space
基礎代碼補全,默認在 Windows 系統上被輸入法佔用,需要進行修改,建議修改爲 Ctrl + 逗 號 (必備) 
Ctrl + Delete 刪除光標後面的單詞或是中文句 (必備) Ctrl +
BackSpace
刪除光標前面的單詞或是中文句 (必備)
Ctrl +
1,2,3...9
定位到對應數值的書籤位置 (必備)
Ctrl + 左鍵單擊在打開的文件標題上,彈出該文件路徑 (必備) 
Ctrl + 光標定位按 Ctrl 不要鬆開,會顯示光標所在的類信息摘要 
Ctrl + 左方向鍵光標跳轉到當前單詞 / 中文句的左側開頭位置 (必備) 
Ctrl + 右方向鍵光標跳轉到當前單詞 / 中文句的右側開頭位置 (必備) 
Ctrl + 前方向鍵等效於鼠標滾輪向前效果 (必備) 
Ctrl + 後方向鍵等效於鼠標滾輪向後效果 (必備)


Alt + ` 顯示版本控制常用操作菜單彈出層 (必備)用來管理代碼版本控制信息 
Alt + Q 彈出一個提示,顯示當前類的聲明 / 上下文信息 
Alt + F1 顯示當前文件選擇目標彈出層,彈出層中有很多目標可以進行選擇 (必備) 
Alt + F2 對於前面頁面,顯示各類瀏覽器打開目標選擇彈出層
Alt + F3 選中文本,逐個往下查找相同文本,並高亮顯示
Alt + F7 查找光標所在的方法 / 變量 / 類被調用的地方
Alt + F8 在 Debug 的狀態下,選中對象,彈出可輸入計算表達式調試框,查看該輸入內容的調試結果 
Alt + Home 定位 / 顯示到當前文件的 Navigation Bar
Alt + Enter

IntelliJ IDEA 根據光標所在問題,提供快速修復選擇,光標放在的位置不同提示的結果也不同 (必 備) 
Alt + Insert 代碼自動生成,如生成對象的 set / get 方法,構造函數,toString() 等 (必備) 


Alt + 左方向鍵切換當前已打開的窗口中的子視圖,比如 Debug 窗口中有 Output、Debugger 等子視圖,用此快捷鍵就可 以在子視圖中切換 (必備)
Alt + 右方向鍵
按切換當前已打開的窗口中的子視圖,比如 Debug 窗口中有 Output、Debugger 等子視圖,用此快捷鍵就 可以在子視圖中切換 (必備)

idea跳方法快捷鍵:
Alt + 前方向鍵當前光標跳轉到當前文件的前一個方法名位置 (必備)
Alt + 後方向鍵當前光標跳轉到當前文件的後一個方法名位置 (必備)
Alt +
1,2,3...9
顯示對應數值的選項卡,其中 1 是 Project 用得最多 (必備)


Shift + F1 如果有外部文檔可以連接外部文檔
Shift + F2 跳轉到上一個高亮錯誤 或 警告位置
Shift + F3 在查找模式下,查找匹配上一個
Shift + F4 對當前打開的文件,使用新 Windows 窗口打開,舊窗口保留
Shift + F6 對文件 / 文件夾 重命名

Shift + F7 在 Debug 模式下,智能步入。斷點所在行上有多個方法調用,會彈出進入哪個方法 Shift + F8 在 Debug 模式下,跳出,表現出來的效果跟 F9 一樣 Shift + F9 等效於點擊工具欄的 Debug 按鈕 Shift + F10 等效於點擊工具欄的 Run 按鈕 Shift + F11 彈出書籤顯示層 (必備) Shift + Tab 取消縮進 (必備) Shift + ESC 隱藏當前 或 最後一個激活的工具窗口
Shift + End 選中光標到當前行尾位置
Shift + Home 選中光標到當前行頭位置 Shift + Enter 開始新一行。光標所在行下空出一行,光標定位到新行位置 (必備) Shift + 左鍵單擊 在打開的文件名上按此快捷鍵,可以關閉當前打開文件 (必備) Shift + 滾輪前後滾動當前文件的橫向滾動軸滾動 (必備)


對文件 / 文件夾 重命名
Shift + F6 
顯示最近打開的文件記錄列表
Ctrl + E  

快速查看文檔的結構:
Ctrl+F3

快速重命名:
Shift+F6

快速重寫一個方法:
Ctrl+O(override)
實現一個方法:
Alt+Shift+P
You may easily override methods of the base class by pressing Ctrl+O in default keymap (Code | Override Methods).
To implement methods of the interfaces that the current class implements 
(or of the abstract base class), use Alt+Shift+P (Code | Implement methods).

自動代碼補全:
and press Alt+Shift+空格:
The SmartType code completion greatly helps to find methods and variables that are suitable in the current context, 
by analyzing the expected type of the whole expression. So doing,IntelliJ IDEA pinpoints the top five most suitable 
results and highlights them on the green background. For example, type


快速產生Get和Set方法:
Alt+Insert
Using Alt+Insert (Code | Generate) in the editor, you can easily generate getter and setter methods for any fields 
of your class.


快速產生一個
try        catch方法

Alt+Shift+Z

press Alt+Shift+Z (Code | Surround With) and choose try?/?catch. The catch blocks for all the exceptions thrown inside 
the block will be generated automatically.
You can customize the bodies of the generated catch blocks on the Code tab of File | Settings | File and Code Templates.
Use other items in the list to surround with other constructs.

快速找到抽象方法的實現:
Ctrl+T
To navigate to the implementation(s) of an abstract method, position the caret at its usage or its name in the 
declaration and press Ctrl+T.

Alt+Shift+向上箭頭 (extend selection) in the editor selects the word at the caret and then selects expanding areas of the 
source code. For example, it may select a method name, then the expression that calls this method, then the whole statement, 
then the containing block, etc. You can also select the word at the caret and the expanding areas of the source code by double-clicking the target areas in the editor.


快速重構代碼:
The Extract Variable refactoring helps you simplify complicated statements in your code. For example, 
in the code fragment below, you can select an expression in the code:
and press Alt+Shift+L (Refactor | Extract | Variable...). This will result in the following:

代碼註釋:
Ctrl+斜
取消代碼註釋:
Ctrl+Shift+斜槓


自動代碼提示,主要用於接收返回值:
Alt+Shift+空格

When you need to cast an expression value to the required type the SmartType code completion will help you. 
For example, type String s = (<caret is here>?
and press Alt+Shift+空格 to see what happen.


快速複製當前行:

main函數的快捷鍵是        psvm    public static void main
打印的快捷鍵是        sout    system.out
F7            單步調試
F8調試,不會走進方法的內部    單步調試
F9            直接跳轉到下一個斷點來進行執行


JavaSEMAVEN工程的骨架就是
maven-archetype-quickstart    打包方式是jar包

JavaWEB工程的骨架是:    
maven-archetype-webapp    打包方式是war包


創建聚合工程的話
選擇版本控父工程
maven-archetype-site


 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章