Wednesday, June 28, 2006

vim :: windows and buffers

VIM can open and edit simultaneously many files. For that VIM uses two elements:

  1. Window - part of VIM's screen space. Screen of every VIM instance can be divided into several windows. When GUI available, one can of course launch several instances of VIM. But in terminal in common case user is limited to single 80x25. When you need to edit two files side by side - VIM windows come to help.
  2. Buffer - place in VIM's memory. That's where file content resides while you are editing it. Buffers is what you see in output of ":ls" command. Every file you open automatically put into new buffer. Buffers are numbered starting from 1. Single buffer can be displayed in more than one window at the same time.
Consult ":help windows" (":help buffers") for indepth info on buffers and windows.

No comments: