vi - vim select and copy text between two files -


i have following scenario, 2 open files

vim -o2 file1.txt file2.txt 

my cursor in file1.txt. want select lines (say line 80 100) in file2.txt without having move cursor file2.txt , yank there text. , if possible using command line of vim. have suggestion?

thanks.

the closest can think of is:

:bn|80,100y|bp|pu 
  • switch next buffer
  • yank
  • switch back
  • put yanked stuff

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -