28

I am looking for a quick way to delete a line in netBeans.

For example in vim you can just type dd for Deleting a line.

underscore666
  • 1,719
  • 4
  • 24
  • 37

3 Answers3

48

Does Ctrl-E not work for you? This is the default short-cut in NetBeans on a Windows machine.

If you click on Help you can get the keyboard shortcuts card, print it out, it's pretty handy and has saved me quite a bit of time hunting for easier ways to do things.

Ewald
  • 5,691
  • 2
  • 27
  • 31
  • @CourtneyPattison - A yes, I didn't have a shiny machine back then - thank you for the update. – Ewald Oct 17 '16 at 10:20
12

Press Ctrl + x, or Ctrl + e while your cursor on the line to be deleted.

The command will delete the line and place the cursor to the starting of next line.

ROOT
  • 11,363
  • 5
  • 30
  • 45
Asif
  • 4,980
  • 8
  • 38
  • 53
3

For Mac command it is command+e.

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
jaxkewl
  • 195
  • 10