Copy a range of lines from a file to another

VIM

To copy a range of lines from a file to another:

1. Open the file in VIM

$ vim fich 

2. Execute the following command within the editor (press Esc while in insert mode)

:num-sup-line,num-inf-linew! file-name

Example:

:10,50w! file-name

Further reading

– help write

YouTube Video
YouTube Video
YouTube Video

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.