Eclipse copy/paste entire line keyboard shortcut

后端 未结 25 3176
感动是毒
感动是毒 2020-12-07 07:05

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

25条回答
  •  [愿得一人]
    2020-12-07 07:49

    1. Ctrl-D would delete a line
    2. Ctrl-Z would undo deletion, with highlithing entire line
    3. Ctrl-X/C cut or copy entire line

    The advantage over Ctrl-Alt-Down followed by Ctrl-X suggested by other users is that it doesn't make eclipse think that the file was changed in any way. It's also faster and causes no problems even if the user has rotating screen issue with Ctrl-Alt-Down/Up keyboard shorcut. So there's no need to remap shorcuts for this.

    Another way to go would be hitting Alt-Shift-Up until the entire line gets selected. If you've gone too far, of course you can select less with Alt-Shift-Down.

提交回复
热议问题