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

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


当前回答

Ctrl +alt+下/上/左/右作为热键优先于eclipse设置。作为替代,我尝试了不同的方法。

Step 1: Triple click the line you want to copy & press `Ctrl`-`C`(This will
select & copy that entire line along with the `new line`).
Step 2: Put your cursor at the starting of the line where you want to to paste
your copied line & press `Ctrl`-`V`.(This will paste that entire line & will
push previous existing line to the new line, which we wanted in the first place).

其他回答

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

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

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

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

这是另一种方法:

1) Alt+Up and Alt+Down (or Alt+Down and Alt+Up, order does not matter)
2) Ctrl+C

当然vim的“yy”是最快的:)

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

Ctrl+Alt+Down复制当前行到下面像记事本++ (Ctrl+D)

如果你的整个屏幕是180°腐烂,那么你应该禁用你的热键设置。

右键单击—>图形选项—>热键—>禁用

现在你可以尝试快捷键Ctrl+Alt+Down