Quick Tips: VIM Yank to New File

In a case you want to copy (yank) the lines into a new file in VIM. Let say from line 20 to line 400.

You just need to type at the command line mode.

:20,400w newfilename <enter>
Advertisements