Notepad++: select text till the end of visual line with SHIFT+END
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.
Related videos on Youtube
TecMan
Updated on September 18, 2022Comments
-
TecMan over 1 year
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:
However what I need is this:
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?
-
TOOGAM almost 9 yearsI'd be curious about what happens if you press End (instead of Shift End), what happens when you press Ctrl-End, and what happens when you use SC1 or SCiTE (both available from the SCiTE site), since Notepad++ is based on SCiTE. [link]scintilla.org/SciTEDownload.html
-
TecMan almost 9 years@TOOGAM, End works as expected - moves the caret to the end of the visual line. IMHO, now all this is not important as we have a working solution suggested by boot13.
-
-
TecMan almost 9 yearsExcellent!! I just set SCI_LINEENDEXTEND to 'None' in my configuration as I do not see any need in this feature.
-
boot13 almost 9 yearsAh, I didn't notice that was an option. Cool! I'm thinking about making that my default setup for Notepad++. I noticed this behaviour before but didn't look into a workaround until I saw your question.
-
TecMan over 8 yearsI also set the mirror command to move the caret to the first character of the current line by the Home key. This is SCI_HOMEDISPLAY. For selection, the corresponding command is SCI_HOMEDISPLAYEXTEND.