2009/10/20 Roald de Vries <[email protected]>:
>
> On Oct 20, 2009, at 6:51 AM, winterTTr wrote:
>> when we use ":e filename" , vim always create a new buffer and load
>> the file.
>> But the :r filename" just read the content to the current buffer ,
>> without
>> associating the file information to the current buffer .
>>
>> Now , I use the bufnr('foo' , 1 ) to create a buffer , and then , i
>> want to load
>> a file ( like "D:\1.txt")  to this buffer as while as associate the
>> file information
>> with this buffer , which seems that i use with one command ":e D:
>> \1.txt".
>>
>> Can  there be a way to do what i want ?
>>
>> PS:
>> simply speaking , I would like to open ( not  just read ) a file on
>> the current buffer ,
>> without creating a new buffer .
>
> You can do:
> :r $file
> :save $file
> The latter will associate the current buffer with file $f.
>
> >
>

Yes, maybe this is another method  to do this.
It seems that we can't replace the current buffer simply
Thanks to your suggestion.

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

Reply via email to