On 11/04/09 21:40, Tim Chase wrote:
>
>> I know you can do
>>
>> :70,72w>>  fileB.tex
>>
>> to move lines 70-72 from this file to the end of fileB.tex. Is there a
>> way (and how) do you move these lines to a specific line in File B?
>
> On most *nix boxes, you can use
>
>     :vi fileB.tex
>     :42r! sed -n 70,72p fileA.tex
>
> to read lines 70-72 of fileA.tex into fileB.tex after line 42
>
> For Win32 boxes, you'd have to open both and copy/paste the
> contents between them:
>
>     vi fileA.tex
>     :70,72y
>     :e fileB.tex
>     :42p
>
> -tim

Correction: :p is :print. What you want is :42pu or :42put


Best regards,
Tony.
-- 
        How many seconds are there in a year?  If I tell you there  are
3.155  x  10^7, you won't even try to remember it.  On the other hand,
who could forget that, to within half a percent, pi seconds is a
nanocentury.
                -- Tom Duff, Bell Labs

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to