Idea 快捷操作

idea 常用快捷鍵 -windows

註釋

ctrl + / 註釋光標所在行,再次按鍵,取消註釋
ctrl + shift + / 註釋選中的代碼,可多行,再次按鍵,取消註釋

查找和替換

ctrl + f    當前文件查找關鍵詞
ctrl + shift + f 全局查找關鍵詞
ctrl + n  查找類
ctrl + shift + n 查找文件
ctrl + e 最近打開的文件
ctrl + shift + e 最近修改的文件

修改和重命名

Ctrl + r  當前文件查找並替換
ctrl + shift + r 全局查找並替換
shift+ f6 重命名
ctrl + shift + u 大小寫轉化

定位和移動

shift + enter 定位到下一行
ctrl + g    定位到指定行號
F2  定位到錯誤行,警告行
alt + f7 找到類方法屬性使用(find useage)
alt + left/right    切換工作區文件
alt + up/down       切換方法
ctrl + alt + left/right  切換到上次瀏覽位置
Alt+Shift+Up/Down 上/下移一行
ctrl + shift + up/down  上下移動選中代碼塊
ctrl + b    進入到光標所在處的方法(同按住ctrl左鍵方法)
ctrl + alt + b  定位到方法實現處

粘貼複製

ctrl + c    複製
ctrl + v    粘貼
ctrl + shift +v 粘貼最近幾次複製的內容(可以用來比對文本)
ctrl + d    複製並向下粘貼一行
ctrl + y    刪除一行
shift + enter 向下插入新行
ctrl + enter 向上插入一行
ctrl + backspace  按照單詞刪除
F5 複製文件
ctrl + shift + c  複製文件路徑(硬盤)  D:\project\demo\src\main\java\com\controller\DemoController.java
ctrl + alt + c  複製文件路徑(項目,必須是類) com.controller.DemoController
                

自動填充代碼

alt + insert    生成構造get/set等
ctrl + o    重寫父類的方法
ctrl + i    實現方法
Ctrl + alt+V 自動補全返回值
ctrl + j  顯示命令 sout psvm geti 都是出自於這裏

格式化

ctrl + alt + l 格式化代碼(對齊,縮進)
ctrl + alt + o 清除多餘的import

視圖

ctrl + ”+/-” 當前方法展開、摺疊
ctrl + shift + ”+/-” 全部展開、摺疊
alt + f8 計算表達式的值(只有在debug的過程中才有效)
ctrl + p 顯示方法的參數信息
ctrl + q 顯示方法的簽名信息
ctrl + h 顯示類結構圖和繼承關係
alt + f1 顯示當前文件位置
ctrl + u    查看父類
ctrl + alt + s 打開idea設置(file-setting)
ctrl + alt + shift + s 打開當前項目設置(file-project structure)
ctrl + ~ 快速切換方案(界面外觀、代碼風格、快捷鍵映射等菜單)

調試用快捷鍵

ctrl + shift + f8 查看所有斷點
ctrl + shift + f9 編譯
alt + shift + f9 debug
alt + shift + f10 run
F8,步過
F7,步入
shift+F7,智能步入
shift+F8,步出
ctrl + f2 停止

git快捷鍵

alt + ~ 拉起VSC菜單
ctrl + k  commit
ctrl + alt + z  revert
ctrl + shift + k push
發佈了26 篇原創文章 · 獲贊 15 · 訪問量 1萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章