On 2012-05-13, Taylor Hedberg wrote:
> Gary Johnson, Sat 2012-05-12 @ 16:11:27-0700:
> > > In the past, if I used 'e' to open a file it would open it in a new
> > > buffer.
> > 
> > That should never have worked.  ":e" opens a file in the current
> > buffer.  To open a file in a new buffer you need to use a different
> > command such as ":split".
> 
> I think your terminology is a bit confused here. :edit opens a file in
> the current *window*, but it is in fact in a separate *buffer*. :split
> with no arguments opens a new window for the same buffer as the one you
> are currently in; with arguments it opens a new window on a different
> buffer (creating the buffer if it does not already exist).
> 
> Buffers essentially have a one-to-one relationship with files. If a file
> is open in Vim, it is associated with a particular buffer. If you then
> open another file, a new buffer is created for it. There is no way to
> open a different file in the same buffer as an already-opened one.
> 
> Windows, not buffers, are the actual rectangular viewports that you seem
> to be referring to as buffers here, unless I am completely
> misunderstanding you. They are the things that can be split in various
> ways, occupy tab pages, etc.

I am using the terminology as I intended.  However, I was wrong
about the behavior of Vim with respect to the creation of buffers.
For whatever reason, I thought that since ":edit somefile" flushed
the current buffer contents and replaced them in the current window
with the contents of somefile, that the contents of the buffer were
being replaced by the contents of somefile.  I will be making
regular use of ":ls" for a while to cement the actual behavior in my
head.

Thanks for the correction.

Regards,
Gary

-- 
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

Reply via email to