How to select non contiguous lines of code in Notepad++?
from the help:
If a stream area is selected, it is possible to add another, disjoint area by Ctrl-clicking its start point and moving the mouse to the end point. More than one extra selection can be added this way. (Multi-Editing should be enabled in Preferences)
Source: http://npp-community.tuxfamily.org/documentation/selecting-text
tl;dr - Settings
-> Preferences
-> Editing
-> Enable Multi-Editing
-> check. Then Ctrl-Click for each section.
For some reason, Ctrl-clicking in the line numbers selects ALL lines (even when Multi-Editing is enabled), not the non-consecutive lines needed.
Bookmarks provide a way to cut/copy/paste these lines, but if a large section of consecutive lines needs bookmarking, a bookmark is only added to one line (where the cursor is, even though the user had selected all these lines before choosing "Toggle Bookmark").
An easy way around this is Search menu >> Mark... >> Mark tab, checking the boxes "Bookmark line" & "In selection", entering . in the "Find what" box, and selecting "Regular expression" in the Search Mode section. Then click "Mark All" and all lines in the selection which contain at least one character should be bookmarked.
Hope this helps