Neovim 101 — Window and Buffer
Explore the built-in window and buffer features, and plugins to help.
In this article, we will get started with the new features of the Neovim window and buffer. We will also explore several interesting plugins that manipulate the window and buffer.
This article is part of the Neovim 101 series.
The Neovim configuration files are available in this repository.
We assume you already have the minimum knowledge of managing windows. The Neovim user documentation (
:h usr_08.txt) provides a very good introduction to managing windows, and the window command (
:h CTRL-W) documentation lists all the supported commands.
Let’s go through several interesting features.
Global Status Line
Specifically for Neovim, we can set a global status line when we have several windows, using the
The value of this option influences when the last window will have a
- 0 — never
- 1 — only if there are at least two windows
- 2 — always
- 3 — always and ONLY the last window
In the screenshot below, when we set
laststatus to 3, only 1 status line is displayed.
We can also make the status line clickable using the
For example, in the
after/plugin/statusline.lua file, we trigger a Vimscript function when the file name is clicked.