CTRL+C / CTRL+V 在 Eclipse 中不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11613468/
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 18:39:41  来源:igfitidea点击:

CTRL+C / CTRL+V don't work in Eclipse

eclipsekeyboard-shortcuts

提问by Marcelo

It's a very weird behavior. My Ctrl+C/ Ctrl+Vkeyboard shortcuts are not being called in my Juno Eclipse. I know it is somewhat broad... But I'm really lost. I'm using Ubuntu 12. Can it be a OS configuration issue?

这是一种非常奇怪的行为。在我的Juno Eclipse中没有调用我的Ctrl+ C/ Ctrl+V键盘快捷键。我知道它有点宽泛……但我真的迷路了。我使用的是 Ubuntu 12。这可能是操作系统配置问题吗?

采纳答案by Marcelo

I've searched a little bit here and I found an interesting issue: my Ctrl+C/ Ctrl+Vcommand is being called, but in WRONG file! I gonna explain: I'm programming two different projects, in which both have files with same name. When I open both, and try write on them, Eclipse becomes confused and calls command only in one of they. I have unsuccessfully pastedfrom clipboard in one, and time later I've found the pastedcommands in the other file! Very weird issue. Now I wonder that it can be a workspacebug from Eclipse.

我在这里搜索了一下,发现了一个有趣的问题:我的Ctrl+ C/ Ctrl+V命令正在被调用,但是在错误的文件中!我要解释一下:我正在编写两个不同的项目,其中都有同名的文件。当我打开两者并尝试在它们上写入时,Eclipse 变得困惑并且仅在其中一个中调用命令。我从剪贴板粘贴到一个文件中失败,后来我在另一个文件中找到了粘贴的命令!很奇怪的问题。现在我想知道它可能是Eclipse的工作区错误。

回答by Xsasan

On my Eclipse, only CTRL+Cdid not work all the time, especially when Eclipse was running for long time. Then CTRL+Vjust pasted previously copied text.

在我的 Eclipse 上,只是CTRL+C一直没有工作,尤其是当 Eclipse 运行很长时间时。然后CTRL+V只是粘贴以前复制的文本。

What worked for me is to unbind CTRL+C in Eclipse Preferences (General -> Keys). Then the issue never showed up again.

对我有用的是在 Eclipse Preferences (General -> Keys) 中解除 CTRL+C 的绑定。然后这个问题就再也没有出现过。

回答by Bananeweizen

You have installed the Android Development Tools and you experience this bug.

您已安装 Android 开发工具并遇到此错误

回答by johnbrad

Dave's fix of removing CTRL+Cfrom eclipse preferences (Window->Preferences->General->Keys : filter for 'Ctrl+C', click 'Unbind Command') also worked for me. Thanks Dave!

Dave 修复了从 eclipse 首选项中删除CTRL+ 的方法C(Window->Preferences->General->Keys : filter for ' Ctrl+ C', click 'Unbind Command')也对我有用。谢谢戴夫!

The 'Copy' function continues to work, even though it is not listed in the preferences list.

“复制”功能继续工作,即使它没有列在首选项列表中。

Note I was running Eclipse 3.7.2 with CDT 8.0.2.201202111 on Ubuntu.

注意我在 Ubuntu 上运行带有 CDT 8.0.2.201202111 的 Eclipse 3.7.2。

回答by Tim Mottram

I had this issue when CAPS LOCK was on.

当 CAPS LOCK 打开时,我遇到了这个问题。

回答by eskalera

I just experienced the exact same issue.

我刚刚遇到了完全相同的问题。

It started after installing the Swordfish plugin so I tried uninstalling it and it's back to normal now.

它在安装 Swordfish 插件后开始,所以我尝试卸载它,现在又恢复正常了。

回答by Rudy Vissers

It could also be the case in the following scenario :

在以下情况下也可能是这种情况:

You have assigned the shortcut Ctrl+CCtrl+Pto close a project. It is perfeclty possible. I found the shortcut convenient and easy to remember.

您已指定Ctrl+CCtrl+P关闭项目的快捷方式。这是完全可能的。我发现快捷方式既方便又容易记住。

But the shortcut has a side effect to invalidate the Ctrl+Cwhich does the copy.

但是快捷方式有一个副作用,使Ctrl+C复制的对象无效。

In other words, and IMHO, eclipse does allow us to use Ctrl+CCtrl+Pbut it is not well managed... That has an interference on Ctrl+C.

换句话说,恕我直言,eclipse 确实允许我们使用,Ctrl+CCtrl+P但它没有得到很好的管理......这对Ctrl+C.

I mean if you type the C and the P quick enough it should be different than only to type the C alone...

我的意思是,如果你输入 C 和 P 的速度足够快,它应该与仅输入 C 不同......