Android Studio 键盘快捷键控制
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22578776/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android Studio Keyboard shortcut control
提问by Mahi
Can anyone give me some suggestion or link of all controls of Android Studio keyboard shortcuts?
谁能给我一些关于 Android Studio 键盘快捷键的所有控件的建议或链接?
回答by deniz
Move to File
-> Settings
-> Keymap
and change Keymaps
settings to eclipse so that you can use the short cut keys like in eclipse.
移至File
-> Settings
->Keymap
并将Keymaps
设置更改为 eclipse,以便您可以像在 eclipse 中一样使用快捷键。
回答by Scott Barta
Preferences > Keymap will show you all the keyboard bindings.
Preferences > Keymap 将显示所有键盘绑定。
A couple helpful hints to help you find features:
一些有用的提示可帮助您找到功能:
You can search actions by name; on MacOS the keybinding is Command+Shift+A. You can start typing the name of a command and it will show you all matching commands and their key bindings if they have one. That's really convenient for looking up the key shortcut for something if you have a hint of what it's called.
您可以按名称搜索操作;在 MacOS 上,键绑定是Command+ Shift+ A。您可以开始键入命令的名称,它会显示所有匹配的命令及其键绑定(如果有的话)。如果您对某个东西的名称有所了解,那么查找快捷键非常方便。
In most dialogs/windows there's a search box, and you can usually just start typing to start a search. It's especially good for preferences, where there are so many options that are hard to find.
在大多数对话框/窗口中都有一个搜索框,您通常只需开始输入即可开始搜索。它特别适合偏好,其中有很多难以找到的选项。
回答by Aritra Roy
I may be late to answer this, but would like to help all others who come up to this page from now.
我可能会迟到回答这个问题,但我想从现在开始帮助所有其他人来到这个页面。
Here is the list of all the most productive shortcuts that I have been using regularly in my day to day Android development. It saves a lot of time, seriously.
以下是我在日常 Android 开发中经常使用的所有最高效快捷方式的列表。它节省了很多时间,真的。
- Find only classes - CMD + o
- Find files - CMD + Shift+ o
- Find everything - Double Shift
- Find symbol - CMD + Alt+ o
- Find in page - CMD + f
- Find usages - fn+ Alt+ f7
- Generate boilerplate code - CMD + j
- Quick fix - Alt+ Enter
- Code completion - Ctrl+ Space
- Definition of a class or method - Alt+ Space
- Navigate to a class or method - CMD + Left Click
- Refactor rename - fn+ Shift+ f6
- Run app - Ctrl+ R
- Format code - Alt+ CMD+ L
- Show documentation - fn+ f1
- Mode code up/down - Shift+ CMD+ up/down
- Generate Code - CMD + N
- Recently opened files - CMD + e
- Recently edited files - CMD + Shift+ e
- Delete lines at one go - CMD + Delete
- Add single line comment - CMD + /
- Add block comment - CMD + Alt+ /
- 仅查找类 - CMD +o
- 查找文件 - CMD + Shift+o
- 查找所有内容 - 双班制
- 查找符号 - CMD + Alt+o
- 在页面中查找 - CMD +f
- 查找用法 - fn+ Alt+f7
- 生成样板代码 - CMD +j
- 快速修复 - Alt+Enter
- 代码补全 - Ctrl+Space
- 类或方法的定义 - Alt+Space
- 导航到一个类或方法 - CMD +Left Click
- 重构重命名 - fn+ Shift+f6
- 运行应用程序 - Ctrl+R
- 格式代码 - Alt+ CMD+L
- 显示文档 - fn+f1
- 模式代码上/下 - Shift+ CMD+up/down
- 生成代码 - CMD +N
- 最近打开的文件 - CMD +e
- 最近编辑的文件 - CMD + Shift+e
- 一次删除行 - CMD +Delete
- 添加单行注释 - CMD +/
- 添加块注释 - CMD + Alt+/
回答by JGPhilip
回答by Amit Vaghela
to assign a keyboard shortcut, you need to navigate to
要分配键盘快捷键,您需要导航到
file --> setting --> keymap --> search and than right click and add keyboard shortcut --> in first stroke
文件 --> 设置 --> 键盘映射 --> 搜索然后右键单击并添加键盘快捷键 --> 在第一笔画中
you can add/change like
您可以添加/更改
ex:
前任:
you want to assign Cntl + w than use Cntl with w
您想分配 Cntl + w 而不是将 Cntl 与 w 一起使用
回答by Vikasdeep Singh
Here is the official list of the shortcuts of Android Studio for Windows, Linux and Mac:
以下是适用于 Windows、Linux 和 Mac 的 Android Studio 快捷键的官方列表:
https://developer.android.com/studio/intro/keyboard-shortcuts.html#configure_custom_keymaps
https://developer.android.com/studio/intro/keyboard-shortcuts.html#configure_custom_keymaps
回答by Peterstev Uremgba
if you have a favourite plugin that doesn't have a shortcut, just navigate to
如果您有一个没有快捷方式的最喜欢的插件,只需导航到
Settings > KeyMap > Double click Plugins > Select desired plugin > Add
Keyboard Shortcut :: Then press down the hot keys you want to assign for the
plugin and click OK.
PS. be careful not to override any important AS shortcut.
附注。注意不要覆盖任何重要的 AS 快捷方式。
回答by s-hunter
Go to Helpand select Default Keymap Referencewill point you to one of these default keyboard shortcuts for Android Studio. It has all the keyboard shortcuts you can do in Android Studio. It's says for it's IntelliJIDEA but Android Studio is based off IntelliJIDEA, so all the keyboard shortcuts listed there apply in Android Studio.
转到“帮助”并选择“默认键盘映射参考”将指向 Android Studio 的这些默认键盘快捷键之一。它具有您可以在 Android Studio 中执行的所有键盘快捷键。据说它是 IntelliJIDEA,但 Android Studio 是基于 IntelliJIDEA,所以列出的所有键盘快捷键都适用于 Android Studio。