Android Studio 快捷键(mac版)

来源:互联网 发布:nginx内置参数 编辑:程序博客网 时间:2024/06/05 07:43


因为最近换了mac,好多快捷键就不知道啦,所以查了查,还蛮有用!伸出小手点个赞哦~~

会慢慢更新啦~

alt+command+F7Find usage (找到所有 用到这个方法或者类的 类,有点绕口哈哈~)
alt+command+L:格式化代码 (就是调整)
alt+command+O:优化import(去掉没用的import 

找当前类中的方法 快捷键为ctrl+F12
command+OOverride Methods
command+IImplement Methods
command+BDeclaration查看定义
alt+command+BImplementations查看其实现
command+USuper MethodClass
control+上下方向键:Previous/Next Method
(shift+)F2:快递定位并高亮错误(deprecateunused
command+ZUndo撤销
shift+command+ZRedo Typing
alt+enter:引入包,添加注释
control+entergenerate settergetter…
shift+command+T:添加Test
command+WExtend Selection
shift+command+WShrink Selection
command+P:参数提示
command+YX):删除当前行(剪切当前行)
command+F11:添加/取消bookmark
shift+F11:显示bookmark列表
command++/-:展开收缩代码
shift+command+上下方向键:Move Line Up/Move Line 

shift+command+左右方向键:返回刚才操作的地方

Search

command+FFind
command+RReplace
control+shift+FFind in Path
control+shiftÏ+RReplace in Path
alt+command+左右方向键:Back/Forward操作
command+ERecent File
shift+command+ERecently Change Files
shift+shiftSearch Method或者Class (Search Everywherecommand+N,shift+command+N,shift+alt+command+N)
command+NSearch Class
shift+command+NSearch File
shift+alt+command+NSearch Symbol

Run/Debug

shift+F10Run
shift+F9Debug
command+F9Make Project
shift+command+F9Make Module
command+F2:关闭当前的执行的task
command+F8:添加/取消断点
shift+command+F8:查看所有断点
Debug
F7Step Into
F8Step Over
shift+F8Step out
F9resume
alt+F9Run to Cursor

Refactor

shift+F6:重命名
command+F6:快速修改函数的参数,返回值或者类添加泛型等
F6Move快速的移动方法或者类
F5Copy快速的移动类
alt+command+C:提取Constant变量
alt+command+V:提取VariableLocal变量)
alt+command+F:提取Field变量
alt+command+M:提取Method

Window

control+左右方向键:tab切换
alt+F4:关闭当前tab
esc+command:切换当前的窗口
shift+esc:隐藏侧栏

VCS

command+KCommit Changes
shift+command+KPush Commit Changes
command+TUpdate Project

Setting

command+,:Android Studio Preferences
command+;:Project Structure

第一部分、基本快键键

Control + R , 运行默认项目

Control + D , 调试默认项目

Command + R,替换文本

Command + F,查找文本

option + 回车,快速修正

Command + D, 自动复制选中行到下一行中

Command + Delete, 删除一行

command + option + L,格式化代码

control + option + o,删除无效的包名引用

Command + N, 生成代码快捷键(覆写,生成setter/getter等)

Command + Option + F , 提取成员变量

Command + Option + C , 提取常量

第二部分、查询结构快键键

Control + H,查看一个类的继承结构

Control + Option + H 查看当前方法的调用结构

Control + Shift + H 查看当前方法的继承结构

第三部分、搜索快键键

shift + shift 整个项目工程搜索

Command + Shift + f 适合查找某个方法在那些类中使用

option + Shift + O , 查找文件并进入

第四部分、其他快键键

Command + L , 进入某一行

Command + E,最近编辑的文件列表

Option + Shift + Up/Down(方向键) 将一行代码上移/下移一行

Command + Shift + U 大小写字母转换

Control + O 覆盖重写方法

Control + I 实现方法

Control + Shift + J 可以实现合并行效果

Command + 回车 可以实现分成两行行效果

0 0
原创粉丝点击