简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM