撤消快捷方式在 Eclipse 中不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16927851/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 20:40:34  来源:igfitidea点击:

Undo shortcut not working in Eclipse

eclipsekeyboard-shortcutse4

提问by denispyr

The last couple of days the Ctrl+Zshortcut (Undo) scrolls down a line (a-la emacs). I tried to switch schemes back and forth, change and redefine the Undo in Default scheme, nothing seems to work. Other combinations (Alt+Ctrl+Z) work fine, other workspaces work fine with Ctrl+Z.

最近几天Ctrl+Z快捷方式 (Undo) 向下滚动一行 (a-la emacs)。我试图来回切换方案,更改并重新定义默认方案中的撤消,似乎没有任何效果。其他组合 ( Alt+ Ctrl+ Z) 工作正常,其他工作区与Ctrl+一起工作Z

Any tip that will save me from redefining the workspace?

有什么技巧可以让我免于重新定义工作区?

回答by Jens Piegsa

The key bindings are stored in the file [workspace]\.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi.

键绑定存储在文件中[workspace]\.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi

You can search for Ctrl+Zin this file. What does it look like? You could try to edit it by hand.

您可以Ctrl+Z在该文件中搜索。它是什么样子的?您可以尝试手动编辑它。

Of course, it is advisable to backup the workspace before.

当然,建议之前备份工作区。

回答by Indu Devanath

From time to time, I have encountered similar issues with keyboard shortcuts. They just disappear, or doesn't seem to work as expected.

我不时遇到键盘快捷键的类似问题。它们只是消失了,或者似乎没有按预期工作。

Until I figure out what the root cause is, I check key bindings.

在找出根本原因之前,我会检查键绑定。

Window > Preferences > General > Keys

Check if the key bindings are still valid. If not, then set them and it should work.

检查键绑定是否仍然有效。如果没有,然后设置它们,它应该可以工作。

回答by aa2120

Window > Preferences > General > Keys Look for Undo in the list, if the Binding is empty click on Restore Command apply and close. That should enable the shortcut.

Window > Preferences > General > Keys 在列表中寻找 Undo,如果 Binding 为空,点击 Restore Command apply 并关闭。那应该启用快捷方式。