Bufferlocal
Bufferlocal refers to data that is scoped to a single buffer in text editors such as Vim and Neovim. In this context, a buffer-local value is stored and used only while that particular buffer is loaded, and other buffers have their own separate values. This allows per-buffer customization and state without affecting other buffers.
In Vim and Neovim, buffer-local data is most commonly implemented in two ways. First, there are buffer-local
Buffer-local data persists for as long as the buffer is loaded. Switching to another buffer uses that
Common use cases include per-filetype customization, per-buffer toggles, and temporary state that should not leak across
Compared with window-local (w:) or global (g:) scope, bufferlocal provides a middle ground: behavior and data that