IDEA常用快捷键

前言

推荐使用。有些设置不一样,需要自己手动调整。

效果展示

Move Caret to Code Block Start / End

诸如{}围起来的代码块,使用该快捷键可以快速跳转至代码块的开始/结尾处。

Move Caret to Previous / Next Word

将光标移至前/后一个单词。

Move Caret to Previous / Next Word with Selection

将光标选中前/后一个单词。

Scroll Up / Down

向上/下滚动一行。

Toggle Case

切换全大/小写。

Undo / Redo

撤销/重做。

Cut / Copy / Paste

剪切/复制/粘贴。

Join Lines

将选中的行合并成一行。

Replace

查找、替换字符串。

Find in Files

在文件中查找。

Find Usages

查找当前变量/方法/类的使用。

Go to Line:Column

跳转到指定行:列。

Last Edit Location

返回上次编辑位置。

Next Highlighted Error

定位至下一个错误处。

Show Context Actions

显示上下文操作。

Expand / Collapse

展开/收缩代码。

Comment with Line Comment

使用//进行注释。

Comment with Block Comment

使用/**/进行注释。

Reformat Code

格式化代码。

Surround With

将选中的代码使用if、while、try/catch等包装。

Delete Line

删除一行。

Back / Forward

返回至前/后一次光标位置。

Move Statement Up / Down

将光标所在的代码块整体向上/下移动。

Start New Line

向下插入一新行。

全局搜索。

设置方法

File -> Settings -> Keymap

操作 快捷键 说明
Move Caret to Code Block Start Ctrl+[ 诸如{}围起来的代码块,使用该快捷键可以快速跳转至代码块的开始处
Move Caret to Code Block End Ctrl+] 同上,快速跳至代码块的结尾处
Move Caret to Previous Word Ctrl+向左箭头 将光标移至前一个单词
Move Caret to Next Word Ctrl+向右箭头 将光标移至后一个单词
Move Caret to Previous Word with Selection Ctrl+Shift+向左箭头 将光标选中前一个单词
Move Caret to Next Word with Selection Ctrl+Shift+向右箭头 将光标选中后一个单词
Scroll Up Ctrl+向上箭头 向上滚动一行
Scroll Down Ctrl+向下箭头 向下滚动一行
Toggle Case Ctrl+Shift+U 切换全大/小写
Undo Ctrl+Z 撤销
Redo Ctrl+Y 重做
Cut Ctrl+X 剪切
Copy Ctrl+C 复制
Paste Ctrl+V 粘贴
Join Lines Ctrl+Shift+J 将选中的行合并成一行
Replace... Ctrl+F 查找、替换字符串
Find in Files... Ctrl+H 在文件中查找
Find Usages Ctrl+G 查找当前变量/方法/类的使用
Go to Line:Column... Ctrl+L 跳转到指定行:列
Last Edit Location Ctrl+Q 返回上次编辑位置
Next Highlighted Error Ctrl+W 定位至下一个错误处
Show Context Actions Alt+Enter 显示上下文操作
Expand Ctrl+= 展开代码
Collapse Ctrl+- 收缩代码
Comment with Line Comment Ctrl+/ 使用//进行注释
Comment with Block Comment Ctrl+Shift+/ 使用/**/进行注释
Reformat Code Ctrl+Alt+L 格式化代码
Surround With… Ctrl+Alt+T 将选中的代码使用if、while、try/catch等包装
Delete Line Ctrl+D 删除一行
Back Alt+向左箭头 返回至前一次光标位置
Forward Alt+向右箭头 返回至后一次光标位置
Move Statement Up Alt+向上箭头 将光标所在的代码块整体向上移动
Move Statement Down Alt+向下箭头 将光标所在的代码块整体向下移动
Start New Line Shift+Enter 向下插入一新行
posted @ 2021-09-15 16:14  吃猫的鱼℘  阅读(314)  评论(0编辑  收藏  举报
Document