How do I make Notepad++ delete lines like Eclipse does?
Eclipse has a keyboard shortcut which deletes either the current line (if nothing is selected) or all lines which are part of the currently selected text: Ctrl+D.
Is there a way to make Ctrl+D do the same thing in Notepad++?
The best I could do is remap the shortcut to Scintilla's SCI_LINE_DELETE
, but that only deletes one line at a time, even if the selection spans multiple lines.
Solution 1:
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
Solution 2:
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
.