IntelliJ IDEA for Windows 默认模式下的快捷键
生活随笔
收集整理的這篇文章主要介紹了
IntelliJ IDEA for Windows 默认模式下的快捷键
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
文章目錄
- General 通用
- Debugging 調(diào)試
- Search/ Replace 查詢/替換
- Editing 編輯
- Refactoring 重構(gòu)
- Navigation 導(dǎo)航
- Compile and Run 編譯和運(yùn)行
- Usage Search 使用查詢
- VCS/ Local History 版本控制/本地歷史記錄
- Live Templates 動態(tài)代碼模板
- Other 官方文檔上沒有體現(xiàn)
點(diǎn)擊查看官方文檔
General 通用
| Alt+ 0...Alt+ 9 | Open corresponding tool window | 打開相應(yīng)編號的工具窗口 |
| Ctrl + S | Save all | 保存所有 |
| Ctrl + Alt + Y | Synchronize,reload all from disk | 同步、刷新 |
| Ctrl + Shift + F12 | Toggle maximizing editor | 切換最大化編輯器 |
| Alt + Shift + I | Inspect current file with current profile | 使用當(dāng)前的配置文件檢查當(dāng)前的文件,無此動作 |
| Alt + Shift + I | inspect code with editor settings | 使用編輯器設(shè)置檢查代碼 |
| Ctrl+` | Quick switch current scheme | 快速切換當(dāng)前的scheme(切換主題、代碼樣式等) |
| Ctrl + Alt + S | Open Settings dialog | 打開IDEA系統(tǒng)設(shè)置 |
| Ctrl + Alt + Shift + S | Open Project Structure dialog | 打開項目結(jié)構(gòu)對話框 |
| Ctrl + Shift + A | Find Action | 查找動作(可設(shè)置相關(guān)選項) |
| Control +Tab | Edit window switch | 編輯窗口標(biāo)簽和工具窗口之間切換(如果在切換的過程加按上delete,則是關(guān)閉對應(yīng)選中的窗口) |
| Alt+ Shift + F | Add Favorite | 添加到收藏夾 |
| Command+4 | 隱藏顯示run窗口 |
Debugging 調(diào)試
| F8 | Step over | 進(jìn)入下一步,如果當(dāng)前行斷點(diǎn)是一個方法,則不進(jìn)入當(dāng)前方法體內(nèi) |
| F7 | Step into | 進(jìn)入下一步,如果當(dāng)前行斷點(diǎn)是一個方法,則進(jìn)入當(dāng)前方法體內(nèi),如果該方法體還有方法,則不會進(jìn)入該內(nèi)嵌的方法中 |
| Shift + F7 | Smart step into | 智能步入,斷點(diǎn)所在行上有多個方法調(diào)用,會彈出進(jìn)入哪個方法 |
| Shift + F8 | step out | 跳出 |
| Alt + F9 | Run to cursor | 運(yùn)行到光標(biāo)處,如果光標(biāo)前有其他斷點(diǎn)會進(jìn)入到該斷點(diǎn) |
| Alt + F8 | Evaluate expression | 計算表達(dá)式(可以更改變量值使其生效) |
| F9 | Resume program | 恢復(fù)程序運(yùn)行,如果該斷點(diǎn)下面代碼還有斷點(diǎn)則停在下一個斷點(diǎn)上 |
| Ctrl + F8 | Toggle breakpoint | 切換斷點(diǎn)(若光標(biāo)當(dāng)前行有斷點(diǎn)則取消斷點(diǎn),沒有則加上斷點(diǎn)) |
| Ctrl+Shift + F8 | View breakpoints | 查看斷點(diǎn)信息 |
Search/ Replace 查詢/替換
| Double Shift | Search everywhere | 查詢?nèi)魏螙|西 |
| Ctrl + F | Find | 文件內(nèi)查找 |
| F3 | Find next | 查找模式下,向下查找 |
| Shift+F3 | Find previous | 查找模式下,向上查找 |
| Ctrl + R | Replace | 文件內(nèi)替換 |
| Ctrl + Shift + F | Find in path | 全局查找(根據(jù)路徑),無此動作 |
| Ctrl + Shift + F | Find in files | 全局查找(根據(jù)路徑) |
| Ctrl + Shift + R | Replace in path | 全局替換(根據(jù)路徑),英文名稱有問題,其實(shí)就是無此動作 |
| Ctrl + Shift + R | Replace in files | 全局替換(根據(jù)路徑),用法:選擇被替換的內(nèi)容,再按快捷鍵 |
| Alt+J | Select next occurrence | 選擇下一個引用 |
| Ctrl + Alt + Shift + J | Select all occurrences | 選擇所有引用 |
| Alt + Shift + J | Unselect occurrence | 取消選擇引用 |
| Ctrl + Shift + S | Search Structurally | 查詢結(jié)構(gòu)(Ultimate Edition 版專用,需要自己在Keymap中設(shè)置) |
| Ctrl + Shift + M | Replace Structurally | 替換結(jié)構(gòu)(Ultimate Edition 版專用,需要自己在Keymap中設(shè)置) |
Editing 編輯
| Control + Space | Basic code completion | 基本的代碼補(bǔ)全(補(bǔ)全任何類、方法、變量),代碼智能提示,因為和切換輸入法快捷鍵沖突,所以基本改成Alt+/ |
| Control + Shift + Space | Smart code completion | 智能代碼補(bǔ)全(按預(yù)期類型篩選方法和變量列表) |
| Ctrl + Shift + Enter | Complete statement | 自動結(jié)束代碼,行末自動添加分號 |
| Ctrl + P | Parameter info (within method call arguments) | 顯示方法的參數(shù)信息 |
| Control + Q | Quick documentation lookup | 顯示當(dāng)前位置的變量、方法的 Documentation 內(nèi)容, 快速查看文檔 |
| Shift + F1 | External Doc | 查看外部文檔(在某些代碼上會觸發(fā)打開瀏覽器顯示相關(guān)文檔) |
| Ctrl + 鼠標(biāo)放在代碼上 | Brief Info | 顯示代碼簡要信息 |
| Ctrl + F1 | Error Description | 在錯誤或警告處顯示具體描述信息 |
| Alt + Insert | Generate code… | 生成代碼(getter、setter、構(gòu)造函數(shù)、hashCode/equals,toString) |
| Control + O | Override methods | 覆蓋方法(重寫父類方法) |
| Control + I | Implement methods | 實(shí)現(xiàn)方法(實(shí)現(xiàn)接口中的方法) |
| Ctrl+Alt+ T | Surround?with… | 包圍代碼(使用if…else, try…catch, for, synchronized等包圍選中的代碼) |
| Ctrl+/ | Comment/uncomment with line comment | 單行注釋 |
| Ctrl+Shift + / | Comment/uncomment with block comment | 塊注釋,多行注釋 |
| /** + enter | /** ? | Comment with method/class |
| Ctrl+W | Extend selection | 連續(xù)選中代碼塊,擴(kuò)展所選內(nèi)容,每按一次不斷向外擴(kuò)張 |
| Ctrl+Shift+W | Shrink selection | 減少當(dāng)前選中的代碼塊/縮小選定范圍 |
| Alt + Q | Context info | 顯示上下文信息 |
| Alt + Enter | Show intention actions and quick-fixes | 顯示意向動作和快速修復(fù)代碼,無此動作 |
| Ctrl + Alt + L | Reformat code | 格式化代碼 |
| Ctrl + Alt + O | Optimize imports | 優(yōu)化import |
| Ctrl + Alt + I | Auto-indent line(s) | 自動縮進(jìn)線 |
| Tab / Shift + Tab | Indent/unindent selected lines | 縮進(jìn)代碼 / 反縮進(jìn)代碼,縮進(jìn)或者取消縮進(jìn)已選擇的行 |
| Ctrl + X | Cut current line to clipboard | 剪切當(dāng)前行或選定的塊到剪貼板 |
| Ctrl + C | Copy current line to clipboard | 復(fù)制當(dāng)前行或選定的塊到剪貼板 |
| Ctrl + V | Paste from clipboard | 從剪貼板粘貼 |
| Ctrl + Shift + V | Paste from recent buffers… | 從最近的緩沖區(qū)粘貼 |
| Ctrl+D | Duplicate current line | 復(fù)制光標(biāo)所在行的內(nèi)容,插入光標(biāo)所在行下面 |
| Ctrl?+?Y | Delete line at caret | 刪除當(dāng)前行或選定的塊的行 |
| Ctrl + Shift + J | Smart line join | 智能的將代碼拼接成一行 |
| Ctrl + Enter | Smart line split | 智能的拆分拼接的行 |
| Shift + Enter | Start new line | 開始新的一行,光標(biāo)所在行下方插入空白行 |
| Ctrl + Shift + U | Toggle case for word at caret or selected block | 大小寫切換 |
| Shift+Ctrl+] | select next tab | 選擇下個tab |
| Shift+Ctrl+[ | select previous tab | 選擇上一個tab |
| - | Select till code block end/start,select next tab/previous tab | 選擇直到代碼塊結(jié)束/開始,不存在此動作 |
| Ctrl + Delete | Delete to word end | 刪除到單詞的末尾 |
| Ctrl + Backspace | Delete to word start | 刪除到單詞的開頭 |
| Ctrl + NumPad+ / - | Expand/collapse code block | 展開 / 折疊代碼塊 |
| Ctrl?+?Shift?+?NumPad+ | Expand all | 展開所有代碼塊 |
| Ctrl?+?Shift?+?NumPad- | Collapse all | 折疊所有代碼塊 |
| Ctrl+F4 | Close active editor tab | 關(guān)閉活動的編輯器選項卡 |
| Shift+Alt+上下箭頭 | Move current line of code | 移動當(dāng)前代碼行 |
| Alt+enter | 導(dǎo)入包,自動修正代碼 | |
| sout | System.out.println() | |
| fori | for (int i = 0; i < ; i++) {} |
Refactoring 重構(gòu)
| F5 | Copy | 復(fù)制文件到指定目錄 |
| F6 | Move | |
| Alt + Delete | Safe Delete | 安全刪除 |
| Shift+F6 | ?F6 | Rename |
| Ctrl+Alt+Shift+T | Refactor this | 重構(gòu)這個 |
| Ctrl + F6 | Change Signature | 更改簽名 |
| Ctrl + Alt + N | Inline | 一致性 |
| Ctrl + Alt + M | Extract Method | 將選中的代碼提取為方法 |
| Ctrl + Alt + V | Extract/Introduce Variable | 提取/引入變量 |
| Ctrl + Alt + F | Extract/Introduce Field | 提取/字段 |
| Ctrl + Alt + C | Extract Constant | 提取常量 |
| Ctrl + Alt + P | Extract Parameter | 提取參數(shù) |
Navigation 導(dǎo)航
| Ctrl + N | Go to class | 查找類文件 |
| Ctrl + Shift + N | Go to file | 查找所有類型文件,打開文件、打開目錄需要在輸入的內(nèi)容前面或后面加一個斜杠 / |
| Ctrl + Alt + Shift + N | Go to symbol | 前往指定的變量 / 方法 |
| Alt + 方向鍵左 / Alt + 方向鍵右 | Go to previous/next editor tab | 左右切換打開的編輯tab頁 |
| F12 | Go back to previous tool window | 返回到前一個工具窗口 |
| Esc | Go to editor (from tool window) | 從工具窗口進(jìn)入代碼文件窗口 |
| Shift + Esc | Hide active or last active window | 隱藏當(dāng)前或最后一個活動的窗口,且光標(biāo)進(jìn)入代碼文件窗口 |
| Ctrl+G | Go to line | 在當(dāng)前文件跳轉(zhuǎn)到某一行的指定處 |
| Alt + Shift + F4 | 未知 | 關(guān)閉活動run/messages/find/… tab |
| Ctrl + E | Recent files popup | 顯示最近打開的文件記錄列表 |
| Ctrl + Alt + 方向鍵左 / Ctrl + Alt + 方向鍵右 | Navigate back/ forward | 退回 / 前進(jìn)到上一個操作的地方 |
| Ctrl?+?Shift?+?Backspace | Navigate to last edit location | 跳轉(zhuǎn)到最后一個編輯的地方 |
| Alt + F1 | Select current file or symbol in any view | 顯示當(dāng)前文件選擇目標(biāo)彈出層,彈出層中有很多目標(biāo)可以進(jìn)行選擇(如在代碼編輯窗口可以選擇顯示該文件的Finder) |
| Ctrl + B /Ctrl + Click | Go to declaration | 進(jìn)入光標(biāo)所在的方法/變量的聲明處 |
| Ctrl + Alt + B | Go to implementation(s) | 跳轉(zhuǎn)到實(shí)現(xiàn)處,在某個調(diào)用的方法名上使用會跳到具體的實(shí)現(xiàn)處,可以跳過接口 |
| Ctrl+Shift+I | Open quick definition lookup | 快速打開光標(biāo)所在方法、類的定義 |
| Ctrl + Shift + B | Go to type declaration | 跳轉(zhuǎn)到類型聲明處 |
| Ctrl + U | Go to super-method / super-class | 前往當(dāng)前光標(biāo)所在方法的父類的方法 / 接口定義 |
| Alt+ 方向鍵下 / Alt + 方向鍵上 | Go to previous/next method | 當(dāng)前光標(biāo)跳轉(zhuǎn)到當(dāng)前文件的前一個/后一個方法名位置 |
| Ctrl + ] / Ctrl + [ | Move to code block end/ start | 移動光標(biāo)到當(dāng)前所在代碼塊的結(jié)束和開始位置,有問題 |
| Ctrl + ] / Ctrl + [ | Move caret to code block end/ start | 移動光標(biāo)到當(dāng)前所在代碼塊的結(jié)束/開始的位置,將插入符號移到代碼塊末尾/開始處 |
| Ctrl + F12 | File structure popup | 彈出當(dāng)前文件結(jié)構(gòu)層,可以在彈出的層上直接輸入進(jìn)行篩選(可用于搜索類中的方法) |
| Ctrl + H | Type hierarchy | 顯示當(dāng)前類的層次結(jié)構(gòu) |
| Ctrl + Shift + H | Method hierarchy | 顯示方法層次結(jié)構(gòu) |
| Ctrl + Alt + H | Call hierarchy | 顯示調(diào)用層次結(jié)構(gòu) |
| F2 / Shift + F2 | Next/previous highlighted error | 跳轉(zhuǎn)到下一個/上一個突出錯誤或警告的位置 |
| F4 / Ctrl + 回車鍵 | Edit source/View source /jump to source | 編輯/查看代碼源 |
| Alt + Home | Show navigation bar | 顯示到當(dāng)前文件的導(dǎo)航條 |
| F11 | Toggle bookmark | 選中文件/文件夾/代碼行,添加/取消書簽 |
| Ctrl + F11 | Toggle bookmark with mnemonic | 選中文件/文件夾/代碼行,使用助記符添加/取消書簽 |
| Ctrl + 0...Ctrl + 9 | ?0…?9 | Go to numbered bookmark |
| Shift + F11 | Show bookmarks | 顯示所有書簽 |
Compile and Run 編譯和運(yùn)行
| Ctrl + F9 | Make project | 編譯Project |
| Ctrl + Shift + F9 | Compile selected file, package or module | 編譯選擇的文件、包或模塊 |
| Alt+Shift+F10 | Select configuration and run | 彈出 Run 的可選擇菜單 |
| Alt+Shift+F10 | Select configuration and debug | 彈出 Debug 的可選擇菜單 |
| Shift + F10 | Run | 運(yùn)行 |
| Shift+F9 | debug | 調(diào)試 |
| Ctrl + Shift + F10 | Run context configuration from editor | 從編輯器運(yùn)行上下文環(huán)境配置 |
Usage Search 使用查詢
| Alt + F7 | Find usages | 在類中查找用法 |
| Ctrl + F7 | Find usages in file | 在文件中查找用法 |
| Ctrl + Shift + F7 | Highlight usages in file | 在文件中突出顯示的用法 |
| Ctrl + Alt + F7 | Show usages | 顯示用法 |
VCS/ Local History 版本控制/本地歷史記錄
| Ctrl + K | Commit project to VCS | 提交代碼到版本控制器 |
| Ctrl + T | Update project from VCS | 從版本控制器更新代碼 |
| Ctrl+Shift+K | Push commits | 推送提交,有問題 |
| Alt+Ctrl+K | Push commits | 推送提交 |
| Ctrl + V | ‘VCS’ quick popup/VCS Operations | “VCS”快速彈出窗口 |
| Alt + Shift + C | Recent Changes | 查看最近的變更記錄 |
| Ctrl + C | ‘VCS’ quick popup | 快速彈出版本控制器操作面板,無此動作 |
| Alt+` | 快速彈出VCS |
Live Templates 動態(tài)代碼模板
| Ctrl +Alt + J | Surround with Live Template | 彈出模板選擇窗口,將選定的代碼使用動態(tài)模板包住 |
| Ctrl + J | Insert Live Template | 插入自定義動態(tài)代碼模板 |
| Ctrl+J - iter | 按照J(rèn)ava SDK 1.5的風(fēng)格進(jìn)行迭代 | |
| Ctrl+J - inst | 用instanceof檢查對象類型并向下轉(zhuǎn)換它 | |
| Ctrl+J - itco | Iterate Collection /迭代java.util.Collection的元素 | |
| Ctrl+J - itit | Iterate Itterator / IIterate elements of java.util.Iterator | |
| Ctrl+J - itli | Iterate List /迭代java.util.List的元素 | |
| Ctrl+J - psf | Public static final | |
| Ctrl+J - thr | throw new |
Other 官方文檔上沒有體現(xiàn)
| Ctrl + Shift +8 | Column Selection Mode | 豎編輯模式 |
總結(jié)
以上是生活随笔為你收集整理的IntelliJ IDEA for Windows 默认模式下的快捷键的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: IntelliJ IDEA 配置文件位置
- 下一篇: Windows应用程序启动命令汇总