【总结】Mac下AndroidStudio快捷键

转自:http://blog.csdn.net/wqb1319856391/article/details/48264073

            http://blog.csdn.net/swust_chenpeng/article/details/46663749


上下行移动: alt+shift +up/down

上下移动整个方法: cmd+shift + up/down

删除行:cmd+delete

向下复制行:cmd+d

扩大缩小选中范围:option+up/down

生成结构体:cmd+option+t(比如生成if,try...catch,synchronized等)

快捷覆写方法:ctrl+o

快捷生成setget等:cmd+n

快捷定位到行首/尾:cmd+left/right

注释代码:cmd+/(//)cmd+option+/(/**/)

格式化代码:cmd+option+L

快捷最近打开:cmd+e

清楚无效引用:ctrl+option+o

查找+替换:cmd+r

查找:cmd+f

来回你刚刚看的地方:cmd+option+left/right

点进去看的:cmd+down

查找调用的位置:ctrl+option+h

全局查找:cmd+shift+f

提示错误解决方案:option+enter

智能补全代码:ctrl+shift+space

补全代码(basic):option+space(原始为ctrl+space 与系统快速搜索快捷键冲突,然后就自己改了键,我是仔setting里搜到basic然后remove掉再加上)。



⌥—> option|alt
⇧—>shift
⌃—>control
⌘—>command
⎋—>esc
↑↓←→

Code

alt+F7:Find usage
alt+command+L:格式化代码
alt+command+O:优化import(去掉无用的import)
command+O:Override Methods
command+I:Implement Methods
command+B:Declaration查看定义
alt+command+B:Implementations查看其实现
command+U:Super Method(Class)
control+上下方向键:Previous/Next Method
(shift+)F2:快递定位并高亮错误(deprecate,unused)
command+Z:Undo撤销
shift+command+Z:Redo Typing
alt+enter:引入包,添加注释…
control+enter:generate setter,getter…
shift+command+T:添加Test
command+W:Extend Selection
shift+command+W:Shrink Selection
command+P:参数提示
command+Y(X):删除当前行(剪切当前行)
command+F11:添加/取消bookmark
shift+F11:显示bookmark列表
command++/-:展开收缩代码
shift+command+上下方向键:Move Line Up/Move Line Down

command+F:Find
command+R:Replace
control+shift+F:Find in Path
control+shiftÏ+R:Replace in Path
alt+command+左右方向键:Back/Forward操作
command+E:Recent File
shift+command+E:Recently Change Files
shift+shift:Search Method或者Class (Search Everywhere:command+N,shift+command+N,shift+alt+command+N)
command+N:Search Class
shift+command+N:Search File
shift+alt+command+N:Search Symbol

Run/Debug

shift+F10:Run
shift+F9:Debug
command+F9:Make Project
shift+command+F9:Make Module
command+F2:关闭当前的执行的task
command+F8:添加/取消断点
shift+command+F8:查看所有断点
Debug:
F7:Step Into
F8:Step Over
shift+F8:Step out
F9:resume
alt+F9:Run to Cursor

Refactor

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

Window

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

VCS

command+K:Commit Changes
shift+command+K:Push Commit Changes
command+T:Update Project

Setting

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



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值