[关闭]
@zongwu 2016-11-15T08:52:18.000000Z 字数 3714 阅读 344

AndroidStudio快捷键

团队协作


Table 1. Default keyboard shortcuts for Windows/Linux and Mac operating systems.

General
保存 Control + S Command + S
同步 Control + Alt + Y Command + Option + Y
最大化/最小化编辑器 Control + Shift + F12 Control + Command + F12
添加到收藏夹 Alt + Shift + F Option + Shift + F
检查当前文件的代码(Lint) Alt + Shift + I Option + Shift + I
切换IDE主题 Control + ` (backquote) Control + ` (backquote)
打开设置对话框 Control + Alt + S Command + , (comma)
打开项目结构对话框 Control + Alt + Shift + S Command + ; (semicolon)
Switch between tabs and tool window Control + Tab Control + Tab
Navigating and Searching Within Studio
搜索一切事物(包括代码和功能按键) Press Shift twice Press Shift twice
查找 Control + F Command + F
下一个(查找) F3 Command + G
上一个(查找) Shift + F3 Command + Shift + G
替换 Control + R Command + R
查找IDE功能 Control + Shift + A Command + Shift + A
通过符号名称搜索 Control + Alt + Shift + N Command + Option + O
查找类 Control + N Command + O
查找文件 Control + Shift + N Command + Shift + O
查找路径 Control + Shift + F Command + Shift + F
打开文件结构 Control + F12 Command + F12
在已打开的编辑窗口中切换 Alt + Right/Left Arrow Control + Right/Left Arrow
代码追踪/跟进源码 F4 / Control + Enter F4 / Command + Down Arrow
在新的窗口打开编辑器 Shift + F4 Shift + F4
弹出最近看过的文件对话框 Control + E Command + E
弹出最近编辑的文件对话框 Control + Shift + E Command + Shift + E
回到最后一个编辑窗口 Control + Shift + Backspace Command + Shift + Backspace
关闭当前的编辑窗口 Control + F4 Command + W
从功能栏回到编辑窗口 Esc Esc
隐藏功能窗口 Shift + Esc Shift + Esc
跳转到指定代码行 Control + G Command + L
打开类层次结构 Control + H Control + H
打开方法层次结构 Control + Shift + H Command + Shift + H
打开调用层次结构 Control + Alt + H Control + Option + H
Writing Code
生成模板代码 (getters, setters, constructors, hashCode/equals, toString, new file, new class) Alt + Insert Command + N
重写方法 Control + O Control + O
实现方法 Control + I Control + I
Surround with (if...else / try...catch / etc.) Control + Alt + T Command + Option + T
删除光标所在行 Control + Y Command + Backspace
收缩/展开当前的代码块 Control + minus/plus Command + minus/plus
收缩/展开所有的代码块 Control + Shift + minus/plus Command + Shift + minus/plus
复制当前行或者选择块 Control + D Command + D
代码补全 Control + Space Control + Space
智能补全提示 (filters the list of methods and variables by expected type) Control + Shift + Space Control + Shift + Space
语法补全 Control + Shift + Enter Command + Shift + Enter
查找说明文档 Control + Q Control + J
展示选择方法的参数列表 Control + P Command + P
代码跟进/追踪 Control + B or Control + Click Command + B or Command + Click
代码实现跟进/追踪 Control + Alt + B Command + Alt + B
代码跟踪到父类/父方法 Control + U Command + U
快速预览方法实现(Preview Code) Control + Shift + I Command + Y
切换项目工具窗口的可见性 Alt + 1 Command + 1
切换书签的可见性 F11 F3
Toggle bookmark with mnemonic Control + F11 Option + F3
注释代码行 Control + / Command + /
注释代码块 Control + Shift + / Command + Shift + /
选中代码块(用于替代鼠标长按下拉选中) Control + W Option + Up
取消选中代码块(用于替代鼠标长按下拉选中) Control + Shift + W Option + Down
跳转到代码块头部(替代鼠标滚轮上滑) Control + [ Option + Command + [
跳转到代码块尾部(替代鼠标滚轮下滑) Control + ] Option + Command + ]
Select to the code block start Control + Shift + [ Option + Command + Shift + [
Select to the code block end Control + Shift + ] Option + Command + Shift + ]
Delete to end of word Control + Delete Option + Delete
Delete to start of word Control + Backspace Option + Backspace
整理imports Control + Alt + O Control + Option + O
智能修复提示 (show intention actions and quick fixes) Alt + Enter Option + Enter
格式化代码 Control + Alt + L Command + Option + L
Auto-indent lines Control + Alt + I Control + Option + I
Indent/unindent lines Tab/Shift + Tab Tab/Shift + Tab
Smart line join Control + Shift + J Control + Shift + J
Smart line split Control + Enter Command + Enter
Start new line Shift + Enter Shift + Enter
Next/previous highlighted error F2 / Shift + F2 F2 / Shift + F2
Build and Run
项目构建 Control + F9 Command + F9
项目构建并执行 Shift + F10 Control + R
Debugging
调试 Shift + F9 Control + D
单步调试结束 F8 F8
单步进 F7 F7
单步进(智能) Shift + F7 Shift + F7
单步出 Shift + F8 Shift + F8
跳转到光标所在行 Alt + F9 Option + F9
分析表达式结果 Alt + F8 Option + F8
唤起应用程序 F9 Command + Option + R
开关控制断点 Control + F8 Command + F8
查看断点 Control + Shift + F8 Command + Shift + F8
Refactoring
复制 F5 F5
移动 F6 F6
安全删除 Alt + Delete Command + Delete
重命名 Shift + F6 Shift + F6
更改签名 Control + F6 Command + F6
Inline Control + Alt + N Command + Option + N
选择代码块,生成独立的方法 Control + Alt + M Command + Option + M
选择代码变量,生成独立的变量 Control + Alt + V Command + Option + V
选择代码变量,生成独立的域变量 Control + Alt + F Command + Option + F
选择代码块,生成常量 Control + Alt + C Command + Option + C
Extract parameter Control + Alt + P Command + Option + P
Version Control / Local History
提交修改 Control + K Command + K
获取更新 Control + T Command + T
查看最近的修改 Alt + Shift + C Option + Shift + C
打开版本控制对话框 Alt + ` (backquote) Control + V
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注