Windows / Mac下的Android Studio常用快
2017-02-17 本文已影响53人
karlsu
Mac常用键盘图标
mac_keybord.png
Android Studio 常用快捷键,仅供参考!
| 说明 | Mac | Windows/Linux |
|---|---|---|
| Quick documentation lookup (打开方法类等的文档) | F1/Control+J | Ctrl + Q |
| Next/previous highlighted error (顺序/逆序快速定位高亮错误) | F2 / Shift + F2 | F2 / Shift + F2 |
| Toggle Bookmark(添加/移除书签) | F3 | F11 |
| Show Bookmarks(打开书签对话框) | Command + F3 | Shift + F11 |
| Jump to Source(跳转到源码) | F4 / Command + Down Arrow | F4 / Control + Enter |
| Copy.. (复制当前文件) | F5 | F5 |
| Move.. (移动当前文件) | F6 | F6 |
| Step Into(debug时跳进方法内部) | F7 | F7 |
| Step Over(debug时跳到下一行) | F8 | F8 |
| Open settings dialogue(打开开发工具设置界面) | Command + , | Control + Alt + S |
| Safe delete(安全删除) | Command + Delete | Alt + Delete |
| Duplicate Line or Block(复制行或者代码块) | Command + D | Control + D |
| Close active editor tab (关闭激活的页签) | Command + W | Control + F4 |
| Show parameters for selected method(方法参数提示) | Command + P | Control + P |
| Exit(退出开发工具) | Command + Q | |
| Go to declaration (directly)跳转到方法、类、字段等的声明 | Command + B or Command + Click | Control + B or Control + Click |
| Find...(查找文本) | Command + F | Control + F |
| Replace...(替换文本) | Command + R | Control + R |
| Collapse/expand current code block(展开当前代码) | Command + minus/plus | Control + minus/plus |
| Collapse/expand all code blocks(展开全部代码) | Command + Shift + minus/plus | Control + Shift + minus/plus |
| Recently opened files pop-up(最近打开的文件) | Command + E | Control + E |
| Find class(查找类) | Command + O | Control + N |
| Generate... (生成代码) | Command + N | Alt + Insert |
| Go to line (跳转到指定行) | Command + L | Control + G |
| Comment/uncomment with line comment (行注释) | Command + / | Control + / |
| Build (构建项目) | Command + F9 | Control + F9 |
| Comment/uncomment with block comment (块注释) | Command + Alt + / | Control + Shift + / |
| Extract Method (导出方法) | Command + Option + M | Command + Alt + M |
| Extract Variable (导出变量) | Command + Option + V | Command + Alt + V |
| Extract Field (导出字段) | Command + Option + F | Command + Alt + F |
| Extract Constant (导出常量) | Command + Option + C | Command + Alt + C |
| Extract parameter (导出参数) | Command + Option + P | Command + Alt + P |
| Reformat code(格式化代码) | Command + Option + L | Command + Alt + L |
| Surround with (if...else / try...catch / etc.)(包括代码块生成) | Command + Option + T | Command + Alt + T |
| Find file (instead of class)(查找文件) | Command + Shift + O | Control + Shift + N |
| Search everything (including code and menus) (搜索工程中的任何位置的文件) | Press Shift twice | Press Shift twice |
| Rename...(重命名) | Shift + F6) | Shift + F6 |
| Override methods (覆盖父类的方法) | Control + O | Control + O |
| Implement methods (实现接口的方法) | Control + I | Control + I |
| Build | Command + F9 | Control + F9 |
| Build and run | Control + R | Shift + F10 |
| Dubug (debug程序到设备) | Control + D | Shift + F9 |
| Open type hierarchy (查看类的层级结构) | Control + H | Control + H |
| Open method hierarchy (查看方法的层级结构) | Command + Shift + H | Control + Shift + H |
| Open call hierarchy (查看调用的层级结构) | Control + Option+ H | Control + Alt + H |
| Optimize imports (优化导包) | Control + Option + O | Control + Alt + O |
| Find usages /Find usages in file | Option + F7 / Command + F7 | Alt + F7 / Ctrl + F7 |
| Toggle case for word at caret or selected block (切换选中的单词或者代码块的大小写) | Command + Shift + U | Ctrl + Shift + U |