android - Android Studio 中的缩进代码快捷方式

标签 android android-studio intellij-idea indentation

<分区>

在 Eclipse 中可以通过 Ctrl+shift+F 缩进代码 不幸的是,这在 Android Studio 中不起作用。

有机会在 Android-Studio 中这样做吗?

最佳答案

你几乎有两个选择:

  1. 设置 -> 键盘映射更改键盘映射,然后选择 Eclipse 键盘映射

  2. 您可以使用默认设置,即 CTRL + ALT + L

编辑:评论中的人建议使用 CTRL + ALT + WinKey+L 是 Linux 的正确绑定(bind),但 IDEA 的文档告诉您它与 Windows 映射相同:https://resources.jetbrains.com/assets/products/intellij-idea/IntelliJIDEA_ReferenceCard.pdf

编辑 #2:我嗅探了更多信息并找到了这个答案 https://askubuntu.com/a/412060 .所以毕竟你可能会在使用默认键盘映射时遇到麻烦,比如 Ubuntu,所以要小心 :)

关于android - Android Studio 中的缩进代码快捷方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41244835/

相关文章:

android - 由于 multidex/android 错误,在 Travis 中构建失败?

c# - C# 让 Android 手机振动 100 毫秒

android - SQLite 数据库不创建 android

java - 在 JNI 中返回多维数组

java - 如何在Instant Apps中实现Multi Dex?

scala - 在 intellij 中使用 scala 项目缓慢编译 play 框架

android - 执行记事本示例时出错

android - 远程aar在Android Studio中是如何工作的

gradle - Intellij Idea将我的 Spring Cloud 契约(Contract)隐藏在测试/资源中

intellij-idea - 开始编写 IntelliJ 插件