[转]史上最全的Android studio 快捷键 MAC 和Win版本

Mac亲测可用,win的话好久没用了,欢迎大家指正

功能描述 keymap对应名字 Mac Win/Linux
提示错误解决方案 Show Intention Actions option + enter alt + enter
AS配置界面 Preferences command + , control+alt+S
工程项目配置界面 Project Structure command + ; Control+Alt+Shift+S
快速构成代码 Code Generate command + N alt + insert
代码提示 Completion/Basic control + space(mac会冲突, 手动修改) ctrl + 空格(win同样大部分和输入法冲突, 手动修改)
选择视图 select in any view option + F1 alt + F1
添加书签标识 Toggle Bookmark option + F3 ctrl + F11
* 向下移动一行 Move Line Down option + shift + Down alt + shift + Down
* 向上移动一行 Move Line Up option + shift + Up alt + shift + Up
* 注释代码 Comment with Line Comment command + / ctrl + /
用代码模板包裹代码 surround with Live Template command + option + J ctrl + alt + J
格式化代码 Reformat Code command + option + L ctrl + alt + L
Copy Reference Copy Reference command + option + shift + C ctrl + alt + shift + C
if/try等包裹代码 Surround With.. command + option + T ctrl + alt + T
查看声明 Declaration command + B ctrl + B
* 快捷向下复制行 Duplicate Line or Block command + D ctrl + D
* 删除行 Delete Line command + x ctrl + Y
* 快捷最近打开 Recent Files command + E ctrl + E
* 查找 Edit/Find/Find command + F ctrl + F
* 文件方法结构 File Structure command + F12 (command+fn+F12) ctrl + F12
显示书签 Show Bookmarks command + F3 shift + F11
代码高亮向下查找 Move To Next Occurrence command + G F3
代码高亮向上查找 Move To Previous Occurrence command + shift + G shift + F3
* 按照模板生成代码 Insert Live Template command + J ctrl + J
定位到行 Navigate/Line command + L ctrl + G
快速到行首/尾 Move Caret to Line Start/End command + Left/Right ctrl + Left/Right
* 代码折叠/展开 Collapse/Expand command + 减号/加号 ctrl + 减号/加号
* 查找类 Navigate/Class command + O ctrl + N
多行注释 Code/Comment command + option + / ctrl + alt + /
* 格式化代码 Reformat Code command + option + L ctrl + alt + L
提示参数类型 Parameter Info command + P ctrl + P
* 查找替换 Replace command + R ctrl + R
查找命令 Find Action command + shift + A ctrl + shift + A
拷贝文件路径 Copy Paths command + shift + C ctrl + shift + C
移动代码块 Move Statement Up/Down command + shift + down/up ctrl + shift + down/up
代码补全 Complete Current Statement command + shift + enter ctrl + shift + enter
全路径查找 Find in Path command + shift + F ctrl + shift + F
代码高亮 Highlight Usages in File command + shift + F7 alt + J
查找文件 Navigate/File command + shift + O ctrl + shift + N
全路径中替换 Replace in Path command + shift + R ctrl + shift + R
* 大小写转换 Toggle Case command + shift + U ctrl + shift + U
显示粘贴版历史 Paste from History command + shift + V ctrl + shift + V
快速查找定义 command + space ctrl + shift + I
* 粘贴 Paste command + V ctrl + V
* 复制 Copy command + C ctrl + C
去除无效包引用 Optimize Imports control + option + O ctrl + alt + O
显示类关系继承体系 Type Hierarchy control + H ctrl + H
快速覆写方法 override Methods control + O ctrl + O
查找调用的位置 Call hierarchy control + option + H ctrl + alt + H
添加书签 Toggle Bookmark F3 F11
扩大缩小选中范围 Extend Selection/Shrink Selection option + UP/Down ctrl + W + shift + W
* 跳转到父类 Super method command + U ctrl + U
关闭当前tab标签 Editor Tabs / Close command + W ctrl + shift + a
关闭除编辑窗口的其余窗口 Hide All Tool Windows command + shift + F12 ctrl + shift + F12
* 预览方法定义 Quick Definition command + Y ctrl + shift + I
* 返回光标最后编辑位置 Last Edit Location command + shift + delete control + shift + Backspace
调到代码块首部/尾部 Move Caret To Code Block Option + Command + [ 或者 ] Control+[ 或者 ]
* 重命名 Rename shift + F6 shift + F6
抽取方法 Extract Method command + option + M control+alt+M
抽取变量 Extract Variable command + option + V control+alt+V
抽取字段 Extract Field command + option + F control+alt+F
抽取常量 Extract Constant command + option + C control+alt+C
抽取参数 Extract Parameter command + option + P control+alt+P
重构入口 Refactor This control + T ctrl + alt + shift + T
* 最近修改 Command +E Ctrl +shift +enter
操作记录 Command +option +Left\Right Command +[ \ ]
重构入口 Ctrl +T Ctrl +alt +shift +T
抽取方法 Command +option +M Ctrl +alt +M
预览方法的定义 command +Y Ctrl +shift +I
代码的折叠 Command + 加号和减号 Ctrl + 加号和减号
窗口内所有代码折叠/展开 Collapse/Expand All command + shift + 减号/加号 ctrl + shift + 减号/加号
快速 生成变量 Option +enter ) Alt +enter
多行操作 按住 option 然后拖住鼠标 中是 alt
显示方法的参数 command+p Ctrl +p
方法的跟进 Command +B Ctrl +alt +B
查找方法的调用处 option+F7 Alt +F7
移动行 option+shift + 方向键上\下 Alt +shift + 方向键 上\下
跳转到上/下一个调用方法 option+shift +←/→ Alt+shift +←/→
功 能 描 述 Mac Win
生成TAG logt
Log logd、loge、logm...
调出代码模板 command+j
if ifc、ifn
for foreach、fori
findviewbyId fbc
visible/gone visible、gone

md文件在我的github
转自csdn

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 219,490评论 6 508
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 93,581评论 3 395
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 165,830评论 0 356
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,957评论 1 295
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,974评论 6 393
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,754评论 1 307
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,464评论 3 420
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,357评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,847评论 1 317
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,995评论 3 338
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,137评论 1 351
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,819评论 5 346
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,482评论 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 32,023评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,149评论 1 272
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,409评论 3 373
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 45,086评论 2 355

推荐阅读更多精彩内容