TextEdit has a dialog that lets you select lines. You can invoke the Select Line window by pressing Command-L. In this window, you can enter a single line number, but you can also enter relative selections or ranges. For example, enter the following:
2: selects line 2.
+2: selects the second line after the line where the cursor is.
-2: selects the second line before the line where the cursor is.
12-14: selects lines 12, 13 and 14.
+2-4: selects 3 lines, 2 lines after the line where the cursor is.
-2-4: selects 3 lines, 2 lines before the line where the cursor is
Mac OS X Hints
http://hints.macworld.com/article.php?story=20130402034148123