tags:

views:

1336

answers:

6

In a visual studio, you would use Ctrl-x, where is in eclipse I am force to select a line or if it is empty, go the beginning of the line before clicking delete/backspace. Is there a quick shortcut?

Thanks

+16  A: 

Ctrl + D

From Help->Key Assist... there are all kinds of useful keyboard shortcuts for Eclipse.

Joshua McKinnon
This is the right answer, but it makes things hard to go between Eclipse and Resharper.
Chris Farmer
+4  A: 

Ctrl + D should delete the line.

Daniel Lew
+12  A: 

In the future, if you need to quickly find a keyboard shortcut for something simple, just hit Ctrl-Shift-L.

mandaleeka
kewl. mother of all shortcuts :-)
Chandan .
+1  A: 

And if you want it as a list to take a print or something, here is a link to the eclipse shortcut pdf.

shortcut to pdf page

Chandan .
+1  A: 

To quickly find shortcuts, hit Ctrl-L, Ctrl-L (Ctrl-L twice), then type something approximating what your command does in the filter text for the key assignments. This works pretty well for most shortcuts, although it can be a bit tricky for some where the name of their menu assignment bears no relation to that of their command in this list (for instance, Team->Revert to base appears in the keys list as 'Replace with latest from repository'), so sometimes a little lateral thought is required :-) If no shortcut exists, it's easy to add one in the keys dialog.

Ewen Cartwright
+1  A: 

You can reassign the Delete Line command to your favourite hotkey.
Window->Preferences
General->Editors->Keys.

Now type "Delete" and reassign the filtered commando.

furtelwart