as的快捷键死活用不习惯,无奈浪费时间自己做了调整
安装as后,第一次启动后如果我们修改了默认的快捷键,会发现
C:\Users\Administrator\.AndroidStudio1.5\config\
下生成了\keymaps\Eclipse copy.xml文件。
放入我们之前版本整理过的Eclipse copy.xml文件
<keymap version="1" name="Eclipse copy" parent="Eclipse">
<action id="CloseActiveTab" />
<action id="CloseContent">
<keyboard-shortcut first-keystroke="control F4" />
<keyboard-shortcut first-keystroke="control W" />
</action>
<action id="CodeCompletion">
<keyboard-shortcut first-keystroke="alt SLASH" />
</action>
<action id="Console.Execute.Multiline" />
<action id="DuplicatesForm.SendToLeft" />
<action id="EditorCompleteStatement">
<keyboard-shortcut first-keystroke="control ENTER" />
</action>
<action id="EditorSplitLine" />
<action id="FileChooser.GotoHome" />
<action id="GotoBookmark1" />
<action id="HippieCompletion" />
<action id="IncrementalSearch" />
<action id="InsertLiveTemplate">
<keyboard-shortcut first-keystroke="control J" />
</action>
<action id="JumpToLastChange" />
<action id="QuickJavaDoc">
<keyboard-shortcut first-keystroke="control Q" />
</action>
<action id="ShowIntentionActions">
<keyboard-shortcut first-keystroke="shift alt J" />
<keyboard-shortcut first-keystroke="shift control M" />
<keyboard-shortcut first-keystroke="control 1" />
</action>
<action id="SwitchApply">
<keyboard-shortcut first-keystroke="shift alt ENTER" />
</action>
<action id="SwitchDown">
<keyboard-shortcut first-keystroke="shift alt DOWN" />
</action>
<action id="SwitchLeft">
<keyboard-shortcut first-keystroke="shift alt LEFT" />
</action>
<action id="SwitchRight">
<keyboard-shortcut first-keystroke="shift alt RIGHT" />
</action>
<action id="SwitchUp">
<keyboard-shortcut first-keystroke="shift alt UP" />
</action>
<action id="ViewSource" />
</keymap>
个别的实在懒得一个一个找了,贴上自己整理过的常用快捷键,希望各位补充
AS与Eclipse 快捷键 对比
(好想骂人)
无需修改
Ctrl + D
Alt + down
Alt + up
ctrl + alt + down 复制当前行
ctrl + alt + up
ctrl + shift + x 运行
ctrl + shift + E (失效了,和ctrl + shift + R 合并 )
ctrl + shift + R (快速定位到 你想打开的 资源文件)
shift + Enter 插入一行
shift + alt + z 快速 if else ,try catch
ctrl + up
ctrl + down 上下移动 整个框
ctrl + alt + r 重命名
ctrl + shift + M 提取 代码块 方法
需要修改
Android Studio && Eclipse
Alt + Enter = ctrl + shift + o
Alt + Insert = shift + alt + s (这个也可以不修改 )
Alt + Enter = Ctrl+ 1 自动修复
Ctrl + shift + Enter = ctrl + Enter 像Eclipse一样快速跳出括号 (Complete Current Statemen)
Ctrl + 空格 = Alt + / (Completion Basic)
Ctrl + alt + 空格 = (class name completetion)
ctrl + f4 = Ctrl + W 关闭 当前资源 (Window->Editor Tabls-> 直接搜索close查找)
shift + click = Ctrl +W
Ctrl + J = 显示 模板 (常用的一些模板) (Insert Live Template )
Alt+Enter = (Ctrl+1)Keymap->Other->Show Intention Action:错误修正提示列表
================================
其他有用快捷键
Ctrl + X 剪切当前行
Ctrl+ / 注释
Ctrl + shift + / /**/类型的注释
Ctrl + E 快速查看最近打开过的文件
Ctrl + N 快速打开某些工具条
cout = Syso
ctrl + q java Doc
ctrl + ~ 切换 快捷键 风格
Ctrl + alt + L 格式化代码
快速打出类似于eclipse 的sysout(针对android studio 1.2.1.1)
settings->搜索Live Templates->如图指定位置改为sysout,原来默认的是sout
提示是区分大小写的,而eclipse默认不区分大小写,因此我们要改成大小写不敏感的
file—-settings—-IDE settings—editor—-code completion—case sensitive completion
===============================
未找到
alt +pageUp / alt +pageDown 切换 xml视图
ctrl + M 最大化 最小化窗口