Copy Specific Line Numbers from One File to Another File:
vim FILE1 :4,17w!FILE2
Open FILE1 using vim/vi.
Write (w) from line 4 to line 17 (inclusive) to FILE2.
Copy Some Lines of One File to Another File:
vim FILE1 Move to any position on the first line you want to copy (using commands like j, /, %, etc.) ma Move to any position on the last line you want to copy (using commands like j, /, %, etc.) :'a,.w!FILE2
Open FILE1 using vim/vi.
Move to any position on the first line you want to copy (using commands like j, /, %, etc.)
Mark (m) that line as a. (In fact, you can use any letter from a to z or A to Z that you choose.)
Move to any position on the last line you want to copy (using commands like j, /, %, etc.)
Write (w) from the line marked a (i.e. 'a) to the current line (i.e. .) (inclusive) into FILE2.
N.B. If you marked the last line first, then moved to the first line, you can write out the lines using :.,'aw!FILE2 instead.