How do I make Notepad++ delete lines like Eclipse does?

Ctrl + Shift + L will achieve the same effect.

Ctrl + L will delete the line but will also keep it in your clipboard replacing clipboard contents.

I'm not sure if you can map Ctrl+D to do the same thing or not. I've not really messed with the keyboard mappings with Notepad++ since they are very similar to those of Visual Studio


I had to map Ctrl+D to both SCI_LINEDELETE and SCI_LINECUT in order to make it behave like Eclipse. Hope this is helpful.

You also need to disable or rebind SCI_SELECTIONDUPLICATE so there's no conflict on Ctrl+D.
To disable a shortcut, highlight it, click Modify set the DropDownList to None, click Apply first and then Okay.


Macro is a good choice here. Though the macro I came up with lags a bit (you can see may be quarter of a second lag between CTRL-D hit and lines getting deleted on a large selections) it works grand both on a single line and multiple lines selection and covers various tricky cases.

So, my macro is:

CTRL + J - if multiple lines are selected they are joined into a single line
HOME - the usual HOME button. Brings cursor to the start of a line (or start of a joined line)
SHIFT + END - selects the line till the end starting from the cursor position
CTRL + SHIFT + L - deletes the whole line

This set of actions covers all possible scenarios of line deletion I have encountered so far during heavy use of notepad++.