On Linux, editing
file_B in vim I want to add line 10-25 from
file_A. Example: One has a whole set of HTML-Documents with quite the same header and yes, one could create a template and start from there, but still:
I am looking for a simple [and elegant] way to insert a range of lines from one file and add it to the file I am currently editing. In vim.
The solutions I found so far but are not exactly what I'm looking for, are
:read file_Awill add *the whole file_A* into file_B. Too much
- there is copy&paste inside vim – but for this one must have opened
- inside file_A
:10,25w! file_Bwill 'send' the given range of lines to
This seems quite close to copy&paste
- one can open multiple windows in vim
But as I work on an 8inch screen, multiple windows make orientation hard
As I wasn't able to find a comfortable solution I wonder if I just misunderstood something or the ways I found so far are commonly used and taken as the standard way.