有人知道在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).

其他回答

在Mac上,我尝试了linecopypaste,效果很好 cmd+c ->复制当前(未选中)行,就像Vi/Vim中的“yy”命令一样 cmd+v ->粘贴,就像Vi/Vim中的“p”命令一样

感谢Larsch的工作!

PD:在优胜美地使用Eclipse Luna 4.4.2

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

将文本从行首复制到光标位置:ctrl + insert

这是有效的,为我节省了很多时间。

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).

对于mac, shift+alt+down_arrow在netbeans的编辑器中工作。