Select range of lines in Notepad++

Solution 1:

Easiest way:

  1. Ctrl + G, go to line 10,000.

    • Menu > Edit > Begin/End select.

  2. Ctrl + G, go to line 25,000.

    • Menu > Edit > Begin/End select.

You now have your range selected.

Or, simply right click for "Begin/End select" option.

Solution 2:

I was trying to figure the same thing out FOREVER! I finally figured it out. The closest answer I could get was CTRLg then ShiftPageUp.

But if you want to select more and not the whole page do go to the last line your wanting and press CtrlShiftHome. That will select from where you are to top of your text. The same goes for CtrlShiftEnd will select from what line you are at to the last line.

Solution 3:

I don't know Notepad++, but as a quick solution, you can use

perl -ne 'print if $. >= 10_000 && $. <= 25_000' < file.sql > some-lines.sql

(The _ in numbers in Perl are just for legibility and can be omitted. It's like writing 10,000 in the US or 10.000 in Germany, but without the cultural confusion.)