AndroidStudio 快捷键——史上最全

来源:互联网 发布:微软雅黑字体 for mac 编辑:程序博客网 时间:2024/06/05 15:26

本份快捷键由草鱼狂飙整理并发布,里面中的错误望大家及时指正。

Editing(编辑)

快捷键

英文释义

中文解释

Ctrl + Space

Basic code completion (the name of any class, method or variable)

基本代码辅助

Ctrl + Shift + Space

Smart code completion (filters the list of methods and variables by expected type)

在很多时候都能够给出Smart提示

Ctrl + Shift + Enter

Complete statement

 

Ctrl + P

Parameter info (within method call arguments)

在方法中查看参数信息

Ctrl + Q

Quick documentation lookup

快速查看文档

Shift + F1

External Doc

 

Ctrl+mouse over code

Brief Info

介绍信息

Ctrl + F1

Show descriptions of error or warning at caret

显示错误或者警告描述

Alt + Insert

Generate code... (Getters, Setters, Constructors, hashCode/equals, toString)

生成常用代码(Getters, Setters, Constructors, hashCode/equals, toString)

Ctrl + O

Override methods

重载方法

Ctrl + I

Implement methods

实现方法

Ctrl + Alt + T

Surround with…(if..else, try..catch, for, synchronized, etc.)

使用(if..else, try..catch, for, synchronized, etc.)包围代码

Ctrl + /

Comment/uncomment with line comment

在选中行注释和反注释

Ctrl + Shift + /

Comment/uncomment with block comment

在选中内容上注释和反注释

Ctrl + W

Select successively increasing code blocks

选中当前代码块

Ctrl + Shift + W

Decrease current selection to previous state

减少当前选择到上一状态

Alt + Q

Context info

内容信息

Alt + Enter

Show intention actions and quick-fixes

显示意图和快速修复

Ctrl + Alt + L

Reformat code

格式化代码

Ctrl + Alt + O

Optimize imports

智能导包

Ctrl + Alt + I

Auto-indent line(s)

自动缩行

Tab / Shift + Tab

Indent/unindent selected lines

自动缩进/反缩进选中行

Ctrl + X or Shift + Delete

Cut current line or selected block to clipboard

剪切

Ctrl + C or Ctrl + Insert

Copy current line or selected block to clipboard

复制

Ctrl + V or Shift + Insert

Paste from clipboard

粘贴

Ctrl + Shift + V

Paste from recent buffers...

 

Ctrl + D

Duplicate current line or selected block

 

Ctrl + Y

Delete line at caret

删除光标所在行

Ctrl + Shift+J

Smart line join

合并行

Ctrl + Enter

Start new line

新起一行(光标位置不动)

Ctrl + Shift + U

Toggle case for word at caret or selected block

 

Ctrl + Shift + ] / [

Select till code block end/start

 

Ctrl + Delete

Delete to word end

删除到单词的结尾

Ctrl + Backspace

Delete to word start

删除到单词的开始

Ctrl + NumPad+/-

Expand/collapse code block

展开/折起代码块

Ctrl +Shift + NumPad+

Expand all

展开全部

Ctrl+ Shift + NumPad-

Collapse all

折起全部

Ctrl + F4

Close active editor tab

关闭当前编辑窗口

Search/Replace(查找替换)

Double Shift

Search everywhere

在任何地方搜索

Ctrl + F

Find

查找

F3

Find next

查找下一处

Shift + F3

Find previous

查找下一处

Ctrl + R

Replace

替换

Ctrl + Shift + F

Find in path

在当前工程查找

Ctrl + Shift + R

Replace in path

在当前工程替换

Ctrl + Shift + S

Search structurally (Ultimate Edition only)

结构化搜索(只在最终编辑使用)

Ctrl + Shift + M

Replace structurally (Ultimate Edition only)

结构化替换(只在最终编辑使用)

Usage Search

Alt + F7 / Ctrl + F7

Find usages / Find usages in file

 

Ctrl + Shift + F7

Highlight usages in file

在当前文件高亮显示

Ctrl + Alt + F7

Show usages

 

Compile and Run(编译和调试)

Ctrl + F9

Make project (compile modifed and dependent)

编译工程

Ctrl + Shift + F9

Compile selected file, package or module

编译选中文件、包、应用

Alt + Shift + F10

Select configuration and run

选择配置并且运行

Alt + Shift + F9

Select configuration and debug

选择配置并且调试

Shift + F10

Run

运行

Shift + F9

Debug

调试

Ctrl + Shift + F10

Run context configuration from editor

 

Debugging(调试)

F8

Step over

 

下一步

F7

Step into

 

进入(方法、类)

Shift + F7

 

Smart step into

 

智能进入

Shift + F8

 

Step out

 

跳出

Alt + F9

 

Run to cursor

 

运行到光标处

Alt + F8

 

Evaluate expression

 

评估表达式

F9

Resume program

 

重新开始项目

Ctrl+F8

Toggle breakpoint

 

加断点

Ctrl+Shift+F8

View breakpoints

 

浏览断点

Navigation(导航)

Ctrl + N

Go to class

跳转到指定类

Ctrl + Shift + N

Go to file

跳转到指定行

Ctrl + Alt + Shift + N

Go to symbol

跳转到指定标示

Alt + Right/Left

Go to next/previous editor tab

跳转到上一个/下一个编辑窗口

F12

Go back to previous tool window

跳转到上一个工具窗口

Esc

Go to editor (from tool window)

跳转到编辑器

Shift + Esc

Hide active or last active window

隐藏活动或者最后一个活动 窗口

Ctrl + Shift + F4

Close active run/messages/find/... tab

关闭 活动/运行/消息/查找……窗口

Ctrl + G

Go to line

跳转到指定行

Ctrl + E

Recent files popup

最近文件窗口

Ctrl + Alt + Left/Right

Navigate back/forward

跳转到上一/下一 编辑的位置

Ctrl + Shift + Backspace

Navigate to last edit location

跳转到最后编辑位置

Alt + F1

Select current file or symbol in any view

在任何视图中选择当前文件/实例

Ctrl + B or Ctrl + Click

Go to declaration

跳转到声明

Ctrl +Alt + B

Go to implementation(s)

跳转到实现

Ctrl + Shift + I

Open quick definition lookup

打开快速定义

Ctrl+Shift + B

Go to type declaration

跳转到类声明

Ctrl + U

Go to super-method/super-class

跳转到父类

Alt + Up/Down

Go to previous/next method

跳转到上一个/下一个方法

Ctrl + ] / [

Move to code block end/start

移动到代码块结尾/开始

Ctrl + F12

File structure popup

查看文件结构

Ctrl + H

Type hierarchy

查看类层次

Ctrl + Shift + H

Method hierarchy

查看方法层次

Ctrl + Alt + H

Call hierarchy

调出结构

F2 / Shift + F2

Next/previous highlighted error

上一个/下一个高亮错误

F4 / Ctrl + Enter

Edit source / View source

编辑源码/查看源码

Alt + Home

Show navigation bar

显示导航栏

F11

Toggle bookmark

收藏

Ctrl + F11

Toggle bookmark with mnemonic

辅助性收藏

Ctrl + #[0-9]

Go to numbered bookmark

跳转到号码标记的收藏

Shift + F11

Show bookmarks

显示收藏

Refactoring(重构)

F5

Copy

复制

F6

Move

移动

Alt + Delete

Safe Delete

安全删除

Shift + F6

Rename

重命名

Ctrl + F6

Change Signature

更改签名

Ctrl + Alt + N

Inline

 

Ctrl + Alt + M

Extract Method

抽取方法

Ctrl + Alt + V

Extract Variable

抽取变量

Ctrl + Alt + F

Extract Field

抽取字段

Ctrl + Alt + C

Extract Constant

抽取常量

Ctrl + Alt + P

Extract Parameter

抽取参数

VCS/Local History(版本控制)

Ctrl + K

 

Commit project to VCS

 

提交

Ctrl + T

 

Update project from VCS

 

更新

Alt +shift +C

View recent changes

 

浏览最近变化

Alt+BackQuote(^)

‘VCS’ quick popup

快速控制窗口

Live Templates(现有模板)

Ctrl + Alt + J

Surround with Live Template

使用现有模板包围

Ctrl + J

Insert Live Template

插入现有模板

iter

Iteration according to Java SDK 1.5 style

使用SDK1.5风格的迭代器

inst

Checkobjecttype with instanceof and downcast it

使用instanceof判断类型

itco

Iterate elements of java.util.Collection

使用迭代器遍历

itit

Iterate elements of java.util.Iterator

快速遍历Iterator

itli

Iterate elements of java.util.List

快速遍历List

psf

public static final

public static final

thr

throw new

抛出

General(通用)

Alt + #[0-9]

Open corresponding tool window

打开对应的工具窗口

Ctrl + S

Save all

保存全部

Ctrl + Alt + Y

Synchronize

同步

Ctrl + Shift + F12

Toggle maximizing editor

最大化编辑器

Alt + Shift + F

Add to Favorites

添加收藏

Alt + Shift + I

Inspect current file with current profile

 

Ctrl + BackQuote (')

Quick switch current scheme

快速切换当前约束

Ctrl + Alt + S

Open Settings dialog

打开设置对话框

Ctrl + Alt + Shift + S

Open Project Structure dialog

打开工程结构对话框

Ctrl + Shift + A

Find Action

查找快捷键

Ctrl + Tab

Switch between tabs and tool window

在窗体之间切换

查找快捷键

Ctrl+Shift+A

 


0 0
原创粉丝点击