Notepad++: select text till the end of visual line with SHIFT+END

keyboard shortcutsnotepadtext-editors

In Notepad++, when I press SHIFT+END to select text from the current caret position till the end of the current visual line, the whole logical line till its end limited with CR/LF is selected.

An example. If the caret is in the very first position in a text document, I get this after pressing SHIFT+END:

Notepad++: SHIFT+END selects till the end of logical line

However what I need is this:

Notepad++: SHIFT+END should select till the end of visual line

It seems this is the standard behavior in all well-known document editors including the built-in Windows Notepad & Microsoft Word. How to achieve this in Notepad++? Is there a setting, or another keyboard command for this?

Best Answer

You can produce the desired behaviour using the Notepad++ Shortcut Mapper. From the menu, select Settings > Shortcut Mapper..., click the Scintilla commands button, and scroll down to SCI_LINEENDWRAPEXTEND.

In my install of Notepad++, this command has no keyboard shortcut by default. Double-click the entry and select Shift and End on the Shortcut dialog. Click the Add button, then the OK button.

Now you need to get rid of the old shortcut: find the entry for SCI_LINEENDEXTEND and edit it. Change the shortcut to something you're unlikely to use, like Ctrl-Alt-Shift-End, then click OK.

Pressing Shift-End should now select the current line to the right side of the screen as desired. Pressing it again should extend the selection to the next line.