Eclipse copy/paste entire line keyboard shortcut

Viewed 218849

Anyone know the keyboard shortcut to copy/paste a line into a new line in Eclipse, without having to highlight the entire line?

ctrl-alt-down turns my whole screen upside down (I'm on windows). Interestingly, that's what's specified in the windows->preferences.

26 Answers

Ctrl-Alt-Down: copies current line or selected lines to below

Ctrl-Alt-Up:: copies current line or selected lines to above

Ctrl-Shift-L: brings up a List of shortcut keys

See Windows/Preference->General->Keys.

I've written the linecopypaste plugin for Eclipse that mimics Visual Studio's copy/cut/paste behaviour. I've also found copycutcurrentline which appears to do the same.

We can assign any command to any action(given) in Eclipse From Menu Bar go to Window > Preferences then search for the keys then search copy line then click on copy line and then click on command in Binding and peform a command which you wish to use for duplicating line i use ctrl+shift+d you can choose whatever you want enter image description here

For mac, shift+alt+down_arrow works in netbeans' editor.

It's working with me on , Eclipse + Spring tool suite .

ALT + COMMAND + DOWN

See how to make the eclipse default shortcut work ctrl alt

  1. Select line: Put cursor on the line to copy, select line with ShiftHome if cursor in the end of line or ShiftEnd if cursor is in starting of line
  2. Duplicate line below (default expected behavior) or above ctrl alt or ctrl alt but the key here is you need to select the line/block

Some answers focus on disabling the screen Rotation in Windows or any other OS, that applies to prevent accidental keypress.

Related