March 24, 2022

Global Statusline for Vim

Hacky workarounds are not needed anymore!

In my post Horizontal Split Separators in Vim, I covered a, relatively hacky way to implement horizontal separators in Vim, using Feline and inactive windows. Well, as of now, Neovim implements a couple new options that make this easier and better.

With the merging of this Pull Request, Neovim introduced an option to set a single, global statusline for the entire editor. In addition, it now supports changing the filling characters for horizontal separators (a concept which didn’t previously exist).

The following Fennel code should be enough to configure both features:

(vim.opt.fillchars:append "horiz:─")
(set vim.opt.laststatus 3)

Its also worth mentioning that this features only ship in neovim:master at the moment.

Have a nice day :)