ruggedbuteducated
ruggedbuteducated

Reputation: 1378

What is the meaning of the terms "buffer" and "window" in vim?

Hi I'm new to vim and I don't know what buffers and windows are. I can't find any tutorials on how to understand these two, so here are my questions:

  1. What is a buffer and how does it differ from a window?
  2. What can the buffer used for? and the window (I'm assuming it's for editing only)?
  3. Where can I find good tutorial on how to use buffers and windows?

Upvotes: 6

Views: 567

Answers (1)

Kent
Kent

Reputation: 195269

does this answer your question?

   A buffer is the in-memory text of a file.
   A window is a viewport on a buffer.
   A tab page is a collection of windows.

A window is a viewport onto a buffer.  You can use multiple windows on one
buffer, or several windows on different buffers.

A buffer is a file loaded into memory for editing.  The original file remains
unchanged until you write the buffer to the file.

I think the best tutorial is vim's help file.

EDIT

the above help info you could find by :help window

Upvotes: 9

Related Questions