Kurru
Kurru

Reputation: 14331

How to make Ctrl-C, Ctrl-X work the same in Eclipse as IntelliJ

In IntelliJ when you press Ctrl+X with text selected, the text is cut, but when there is nothing selected the current line is cut from the source.

Is there a way to have this key behavior in Eclipse?

Same for the copy functionality, but cut is more useful!

Upvotes: 0

Views: 890

Answers (4)

Ilan.K
Ilan.K

Reputation: 718

First of all, thank you very much.
Before reading your question, I was unaware that I was missing this Cut/Copy functionality.

So I looked around a bit, first inside Eclipse key binding system. Then when I was convinced this functionality doesn't simply come "out of the box", I thought about writing a small Eclipse plugin. But than I thought, "Why write bad lines of my own code, when so much somebody must have already wrote it and published it for everybody to enjoy?"

And so, a quick search yielded this copycutcurrentline little dropin.

I've installed it Eclipse 3.7 and it just works

Upvotes: 1

Nehal Damania
Nehal Damania

Reputation: 9008

"Alt + Up\Down Arrow Key" will do the trick to move an entire line up down in a single file.

"Ctrl + Shift + Up\Down Arrow Key" will help you duplicate the selection of line.

Not exactly what you want, but these 2 keyboard shortcuts are very useful.

Upvotes: 0

Aaron Digulla
Aaron Digulla

Reputation: 328594

Yes but it will take some work: You will have to write a plugin for this. There is no hidden/unused key binding for this.

Upvotes: 0

karthik vadapalli
karthik vadapalli

Reputation: 363

ctrl+d will work same as you think.

Upvotes: 0

Related Questions