1. simplest
:100,200 w filename
2. set a start mark named A first, set a end mark named B second, and then
`: 'A,'B w filename`
3. set vim in visual model, such as ctrl+v, and then select all lines that you want to write to a new file, and then press shit+:
:'<,'> w filename # ‘<,’> will be filled by vim auotmatically
4. other
:+0,+99 w filename