How to delete the current line and add a new line in Notepad++?

Notepad++Hotkeys

Notepad++ Problem Overview


How to delete the current line and add a new line in Notepad++?

These two operations are very common but I can't find any key setting how to do them in Notepad++. Can any plugin do this job?

Notepad++ Solutions


Solution 1 - Notepad++

Ctrl + L shall be able to cut the current line and Ctrl + Shift + L shall be able to remove the current line.

You can see and change hotkeys in Settings > Shortcut Mapper... > Scintilla Commands. Look for SCI_LINEDELETE and SCI_LINECUT.

The version of my Notepad++ is 6.1.1.

Solution 2 - Notepad++

Ctrl + L will cut the line.

Ctrl + Shift + L will delete the line (i.e. not copying it to clipboard).

Credits to @BobStein-VisiBone and @RyanGoldstein above.

Please note this works in more applications than just Notepad++!

Solution 3 - Notepad++

Question #1 Ctrl + L or Ctrl + Alt + L as already answered

Question #2 Enter, will add a new empty line and align the cursor to previous

Solution 4 - Notepad++

if you want to delete line you can use find replace feature with extended option in it like

  1. Click Ctrl+F and then go to replace tab
  2. Check the extended option in it
  3. in find type anything
  4. in replace you can type '\n'(to insert blank line) '\t' (to delete blank line)

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionlinjumingView Question on Stackoverflow
Solution 1 - Notepad++Gang YinView Answer on Stackoverflow
Solution 2 - Notepad++Jim AhoView Answer on Stackoverflow
Solution 3 - Notepad++Victor BarrantesView Answer on Stackoverflow
Solution 4 - Notepad++change_is_necessityView Answer on Stackoverflow