有人知道在Eclipse中复制/粘贴一行到新行,而不需要突出显示整行的快捷键吗?
ctrl-alt-down使我的整个屏幕上下颠倒(我在windows上)。有趣的是,这就是windows->首选项中指定的内容。
有人知道在Eclipse中复制/粘贴一行到新行,而不需要突出显示整行的快捷键吗?
ctrl-alt-down使我的整个屏幕上下颠倒(我在windows上)。有趣的是,这就是windows->首选项中指定的内容。
当前回答
(在Windows上测试)[根据以下评论,也适用于Ubuntu, IBM RTC 4 / RSA 9]
在Eclipse中,按Ctrl+Shift+L 2 (或按Ctrl + 3 > type: Keys > Enter)。 在“键入筛选文本”(搜索)文本框中,键入“复制行” 选择筛选行,右键单击“Binding”字段,然后选择全部 按Ctrl + Shift + V 给好
从现在开始,对于任何你想复制的行,只需按Ctrl+Shift+V。
其他回答
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::复制当前行或选定的行到上面
Ctrl-Shift-L:弹出快捷键列表
看到Windows /首选项- >常规- >键。
我已经为Eclipse编写了linecopypaste插件,它模仿了Visual Studio的复制/剪切/粘贴行为。我还发现了copycutcurrentline,它似乎做了同样的事情。
在Mac上,我尝试了linecopypaste,效果很好 cmd+c ->复制当前(未选中)行,就像Vi/Vim中的“yy”命令一样 cmd+v ->粘贴,就像Vi/Vim中的“p”命令一样
感谢Larsch的工作!
PD:在优胜美地使用Eclipse Luna 4.4.2
如果你的windows电脑,你可以试试这个,它也是STS:
Ctrl + win + Alt + Down::将当前行或所选行复制到下方
Ctrl + win + Alt +向上::将当前行或所选行复制到上方