Saturday, February 19, 2011

Re: Including into the current buffer from an external source

Christian Brabandt wrote:
> On Fri, February 18, 2011 5:19 am, Rostyslaw Lewyckyj wrote:
>
>> From the dim recesses of my failing memory, I seem to recall, that
>> there are
>> some vim commands that let one read in, include, a range of records from
>> an external source to a specified location in the current buffer.
>> Something on the order of
>> :(range) read from (to_address)
>> Can some vim guru point me to the proper way?
>> It seems messy to have to open the from source in a second buffer,
>> then yank the desired record range, and finally put the yanked
>> records at the to_address.
>>
>> Advance thanks
>>
> Are you looking for the :r command? You can input either another file
> or even read in the ouput of another command.
>
> See
> :h :read
> :h :read!
>
>
Well sort of. :read inserts the whole file after the current line. But
my memory
insists that there is/was a way to select a specified range of records
from the
source file and insert them at a specific place in the current file. For
example:
Insert records 25 through 50 from file source.txt after record 101 of
the
current buffer.

--
Rostyk

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment