0

Possible Duplicate:
Eclipse copy/paste entire line keyboard shortcut

I want to create an eclipse shortcut.

Wherever line cursor on (without selection) when pressed Ctrl+C, eclipse will copy the whole line to clipboard.

Is this possible?

Community
  • 1
  • 1
uzay95
  • 16,052
  • 31
  • 116
  • 182
  • did you search before asking question? it was already asked [here](http://stackoverflow.com/questions/2321938/eclipse-copy-paste-entire-line-keyboard-shortcut) – jFrenetic Oct 01 '11 at 16:18
  • 1
    @jFrenetic It's not the same question - copy to clipboard vs copy to new line. – Martti Käärik Oct 05 '11 at 12:12
  • @vanaprogeja Then the title should explicitly specify that. Moreover the second answer provided by `larsh` covers copying to clipboard as well. – jFrenetic Oct 05 '11 at 13:34

1 Answers1

1

Key bindings can be associated with commands, but this operation would be 3 commands - Line Start, Select Line End, Copy. You'd have to implement your own command to execute all the three (id = org.eclipse.ui.edit.text.goto.lineStart, id = org.eclipse.ui.edit.text.select.lineEnd and id = org.eclipse.ui.edit.copy). But setting Ctrl+C as key binding would conflict with existing binding - Copy.

Martti Käärik
  • 3,601
  • 18
  • 28