A Vim window is a view of a buffer. A tab page comprises one or more windows. For questions about interaction with the Microsoft operating system, use [microsoft-windows]. For questions about interaction with the desktop windowing system, use [window-management].

In Vim, a window is a visual view of a buffer. There can be multiple (or no) windows associated with any given buffer, and each window can be in a different state (e.g., viewing a different part of the buffer). Windows are grouped together in tab pages.

Some common operations on windows:

  • Quickly create windows with the :split and :vsplit commands. Execute :split to divide the current window horizontally into two views of the same buffer, and use :vsplit to divide the window vertically. By providing an argument to :split or :vsplit, you can specify a different file to view in the new window.

  • Switch windows with the <C-W> commands. Press <C-W> and then one of h, j, k, or l to move left, down, up, or to the right, respectively.

  • Close a window with <C-W>c or :q.

See :help windows within Vim for more information.

history | excerpt history