原文鏈接:https://blog.csdn.net/hebtu666/article/details/102391574
目錄
- 一:idea的個性化設定
- 二:idea快捷鍵Keymap的個性化設定
- 三:自動代碼生成
原文鏈接:
一:idea的個性化設定
idea:File->settings
- 主題背景顏色:
settings->appearance Theme:設定主題 - 滑鼠滾動調整字體:
settings->Editor->General(Mouse下的第二個勾選) - 顯示滑鼠指到方法或類上的提示:
settings->Editor->General(Other里 Delay(ms):1000=1秒) - 自動導包:
settings->Editor->General->Auto Import:Insert imports on paste:設定為ALL
勾選:Add unamiguous和Optimize imports onthe fly - 顯示方法的分隔符:
settings->Editor->General->Appearance->Show method separators(勾選) - 取消單行顯示tabs的操作:
settings->Editor->General->Editor Tabs->Show tabs in one row(取消勾選) - 設定字體:
settings->Font - 設定注釋顏色:
settings->Editor->Color Scheme->Languager Defaults
Comments->(line comment)單行注釋,(block comment)多行注釋 - 修改類頭的檔案注釋資訊
settings->Editor->Code Style->File and Code templates
includes的tabs里的File Header 例如:/**@outhor river @date ${DATE} - ${TIME}*/ - 專案檔案編碼
settings->Editor->Code Style->File Encodings 右側下拉修改為UTF-8
如果匯入不是UTF-8檔案出現亂碼時需要在編輯界面右下角點擊 (Convert) 轉換為UTF-8 - 自動編譯
settings->Apearance && Behavior->Compiler右側2個需打勾,
如果直接運行,不然class檔案還是編譯之前的檔案
Build project automatically(當前專案自動編譯)需打勾
Compile independent modules in parallel(對多個模塊進行并行編譯)需打勾 - 省電模式 默認關閉
FIle->power Save mode
開啟后會關閉代碼檢查和提示功能 - 代碼水平或垂直顯示
在編輯區的tabs右鍵點擊Split Vertically(垂直), Split Horizontally(水平顯示)
二:idea快捷鍵Keymap的個性化設定
| 序號 | 功能 | 快捷鍵 |
|---|---|---|
| 1 | 執行(run) | F5 |
| 2 | 提示補全(class name completion) | alt+/ |
| 3 | 單行注釋(撤銷也一樣哈) | Ctrl+/ |
| 4 | 多行注釋(撤銷也一樣哈) | Ctrl+Shift+/ |
| 5 | 向下復制一行(dupulicate lines) | ctrl+alt+down |
| 6 | 洗掉一行或選中一行(delete line) | ctrl+d |
| 7 | 向下移動一行(move statement down) | alt+down |
| 8 | 向上移動一行(move statement up | alt+up |
| 9 | 向下開始新的一行(start new line) | shift+enter |
| 10 | 向上開始新的一行(start new line before current) | ctrl+shift+enter |
| 12 | 萬能解錯生成回傳值變數 new Date()游標停留位置; | alt+enter |
| 13 | 退回到前一個方法編輯頁面(bock) | alt+left |
| 14 | 進入到下一個編輯頁面 | alt+right |
| 15 | 查看繼承關系( type hierarchy) | ctrl+h |
| 16 | 查看類的繼承機構圖(show uml diagram) | ctrl+shift+u |
| 17 | 查看方法的多層重寫結構(method hierarchy) | ctrl+alt+h |
| 18 | 查找方法在哪里被呼叫(call hierarchy) | ctrl+shift+h |
| 19 | 查看類的結構 | ctrl+o |
| 20 | 重構:修改變數名和方法名(rename) | alt+shift+r |
| 21 | 生成構造器-set-get-tostring | alt+insert |
| 22 | 收起或打開所有的方法(collapse all) | ctrl+shift+減號或加號 |
| 23 | 生成try-catch,region區域注釋等(surround with) | ctrl+alt+t |
| 24 | 查找替換(當前) | ctrl+f |
| 25 | 打開最近修改的檔案(Recently Files) | ctrl+e |
| 26 | 快速搜索類中的錯誤(next highlighted error) | f2 |
| 27 | 提示方法引數型別(parameter info) | ctrl+p |
| 28 | 添加到收藏夾(add to favorites) | alt+shift+f |
| 29 | 抽取方法(extract method) | ctrl+alt+m |
| 30 | 查看檔案說明(quick documentation) | ctrl+q |
| 31 | 大小寫轉換(toggle case) | ctrl+shift+y |
| 32 | 打開java代碼所在硬碟檔案夾(show in explorer) | ctrl+shift+o |
三:自動代碼生成
| 功能 | 快捷鍵 | 效果 |
|---|---|---|
| 查看所有模板 | ctrl+J | 查看所有模板 |
| Main方法 | psvm+Tab | public static void main(String[] args) {} |
| 列印 | sout+Tab | System.out.println(); |
| 回圈遍歷 | fori+Tab | for (int i = 0; i < ; i++) {} |
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/272279.html
標籤:其他
上一篇:排序演算法總結
