有人知道在Eclipse中复制/粘贴一行到新行,而不需要突出显示整行的快捷键吗?

ctrl-alt-down使我的整个屏幕上下颠倒(我在windows上)。有趣的是,这就是windows->首选项中指定的内容。


当前回答

对于个人使用,我添加了一个vim插件,如Vrapper到Eclipse,只使用yy复制整行。

其他回答

如果你的windows电脑,你可以试试这个,它也是STS:

Ctrl + win + Alt + Down::将当前行或所选行复制到下方

Ctrl + win + Alt +向上::将当前行或所选行复制到上方

You have to turn off the graphics hot keys that flip the screen. If you're on Windows, you need to right click on the Windows desktop and select "Graphics Properties..." (or something similar depending on your version of Windows). This will bring up a screen where you can manage graphics and display options, look for a place where you can disable hot keys, sometimes it's hidden under something like "Options and Support". Turn off the CTRL + ALT + ↑ and CTRL + ALT + ↓ hotkeys (alternatively you can just disable all graphics hot keys if you're not using them).

Ctrl+Alt+Down / Ctrl+Alt+Up翻转我的屏幕,所以我在Eclipse快捷方式中覆盖了它 窗口=>首选项=>常规=>按键。 搜索“dupl”可以找到Duplicate Lines命令。我重写了默认设置,并选择Ctrl+Shift+D。对我来说,这很容易记住,就像Ctrl+D删除行一样

在Eclipse中,我们可以将任何命令分配给任何给定的操作 从菜单栏转到 窗口>首选项 然后寻找钥匙 然后搜索复制行 然后单击复制行,然后单击绑定中的命令 并执行一个命令,你想使用复制行我使用ctrl+shift+d 你可以选择任何你想要的

如果你想复制一行到剪贴板,你也可以使用这个技巧:

Ctrl-Alt-Down 紧随其后的是 Ctrl-X

缺点是复制该行的文件变脏了。