How do you write a range of lines to a separate file?
Answer
:10,20w newfile.txt
Explanation
Use :10,20w newfile.txt to write lines 10-20 to a new file. Use :10,20w >> existing.txt to append to an existing file.
:10,20w newfile.txt
Use :10,20w newfile.txt to write lines 10-20 to a new file. Use :10,20w >> existing.txt to append to an existing file.