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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM