因为也是第一次接触mac,所以自己总结了一些常用快捷键,希望对大家有所帮助;
mac键盘符合说明:
- ⌘ Command
- ⇧ Shift
- ⌥ Option
- ⌃ Control
Command相当于Windows中的Ctrl;
command+F 在当前类里面的搜索;
command+Shift+F 在整个IDEA对所有内容的搜索;
command+N 构建get set 方法(新创建谷歌浏览器)
command+Shift+U 选中进行大小写切换
command+/ 对代码进行注释
command+U 找到这个方法的接口
command + option + T 包围代码
command + option + / 块注释
command + J 快速查看文档 (按F1也可以)
command + D 复制当前行或选定的块
command + delete 删除当前行或选定的块
command + shift + 加号 展开所有代码块
command + shift + 减号 折叠所有代码块
command + G 向下查找
command + shift + G 向上查找
command + R 文件内替换
command + shift + F 全局查找(根据路径)
command + shift + R 全局替换(根据路径)
command+W 关闭当前页
control + option + R 弹出run的可选菜单
control + option + D 弹出debug可选菜单
control + O 重写父类方法
control + I 实现接口方法
control + option + R 弹出run的可选菜单
control + option + D 弹出debug可选菜单
control + R 运行
control + D 调试
option+command+A Git:添加提交的文件
option + 向上 选中代码块,向下取消
option + enter 显示意向动作
option + fn + delete 删除到单词末尾
option + delete 删除到单词开始
option + F9 运行到光标出,如果在光标前面还有断点,则进入到断点
option + F8 计算表达式(可以改变变量值,使其生效)
option + 方向键 光标跳转到当前语句的首位或末尾
shift + F7 智能步入,断点运行的行上如果调用多个行,会弹出进入哪个方法
shift + F8 跳出
Shift + F6 重命名文件
按两下shift 全局搜索
F8 进入下一步,不进入方法
F7 进入下一步,进入方法,不进入嵌套方法
F6 移动文件到指定目录
F5 复制文件到指定目录
F2 跳转到下一个警告或错误处