第1组:通用型
说明 | 快捷键 |
---|---|
复制代码-copy | ctrl + c |
粘贴-paste | ctrl + v |
剪切-cut | ctrl + x |
撤销-undo | ctrl + z |
反撤销-redo | ctrl + shift + z |
保存-save all | ctrl + s |
全选-select all | ctrl + a |
第2组:提高编写速度
说明 | 快捷键 |
---|---|
智能提示-edit | alt + enter |
提示代码模板-insert live template | ctrl+j |
批量修改指定的变量名、方法名、类名等-rename | shift+f6 |
大小写的切换-toggle case | ctrl+shift+u |
自动生成返回值变量-introduce variable … | ctrl+alt+v |
复制指定行的代码-duplicate line or selection | ctrl+d |
删除指定行的代码-delete line | ctrl+y |
切换到下一行代码空位-start new line | shift + enter |
切换到上一行代码空位-start new line before current | ctrl +alt+ enter |
第3组:调整格式
说明 | 快捷键 |
---|---|
格式化代码-reformat code | ctrl+alt+l |
使用单行注释-comment with line comment | ctrl + / |
使用/取消多行注释-comment with block comment | ctrl + shift + / |
选中数行,整体往后移动-tab | tab |
选中数行,整体往前移动-prev tab | shift + tab |
向上移动一行(可以移出main方法,更自由)-move line up | alt+shift+↑ |
向下移动一行(可以移出main方法)-move line down | alt+shift+↓ |
向上移动代码-move statement up | ctrl+shift+↑ |
向下移动代码-move statement down | ctrl+shift+↓ |