简体   繁体   English

Android Studio的提交对话框中是否有热键来显示更改而无需触摸鼠标?

[英]Is there a hotkey in Android Studio's commit dialog to show changes without touching the mouse?

I commit often in Android Studio and I always check the changes first. 我经常在Android Studio中提交内容,并且总是先检查更改。 I can press Ctrl-K to open the commit dialog and there I should be able to use F7 to go through the changes. 我可以按Ctrl-K打开“提交”对话框,在那我应该可以使用F7进行更改。

The problem is by default the commit message editor is selected and there F7 does not work for some reason. 问题是默认情况下选择了提交消息编辑器,并且由于某些原因F7无法正常工作。

Is there a hotkey to focus the changes pane, so F7 works? 是否有一个热键可以聚焦于更改窗格,所以F7可以工作? I can do it with the mouse, but I commit frequently, so I'd like to do all these from the keyboard without using the mouse. 我可以用鼠标来做,但是我经常提交,所以我想从键盘上做所有这些而不用鼠标。

The direct answer is no. 直接的答案是否定的。

In commit changes window, it focus on commit Message by default, and it can not be changed. 在提交更改窗口中,默认情况下它专注于提交消息,并且无法更改。 So hotkey can not be used since no files is focused in the commit changes window. 由于无法在提交更改窗口中关注任何文件,因此无法使用热键。

The work around is view diff of the un-committed files before opening the commit changes window : 解决方法是在打开提交更改窗口之前,查看未提交文件的差异

First add two keyboard shortcuts in keymap: 首先在键盘图中添加两个键盘快捷键:

Such as Alt + A for compare with Same Repository Verison, and Alt + D for Show Local Changes. 例如, Alt + A用于与Same Repository Verison进行比较, Alt + D用于显示本地更改。

在此处输入图片说明 在此处输入图片说明

Before commit changes, you can check the local changes by Alt + D , and check the diff of a file by Alt + A . 在提交更改之前,您可以通过Alt + D检查本地更改,并通过Alt + A检查文件的差异。

在此处输入图片说明

After view the diff the the un-committed files, then you can open commit changes window to commit directly. 查看未提交文件的差异后,您可以打开提交更改窗口以直接提交。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM