> ~ biozz / Blog

Saving pixels in NeoVim 2024-03-16

Maximizing the editor area in NeoVim

Reading time: 2m (241 words)

I am probably at that point where I am happy about how my NeoVim looks (not really). The motivation for this post came from the discovery of vimpostor/vim-tpipeline. I remember how I switched to vim.opt.cmdheight = 0 as soon as it was merged into master on Jun 13, 2022. It was quite buggy at first and almost didn’t work properly. You had those annoying Press ENTER or type command to continue prompts. After a couple of months folke/noice was announced and that’s when cmdheight=0 became usable. Becuase noice has cmd line feature which also hides command line and moves it to the popup.

Time passed and cmdheight=0 became stable. I have also started to use tmux a lot. And I never liked that double status line when working in NeoVim from the terminal. It was like this for a couple of years. Until recently, when I stumbled onto vimpostor/vim-tpipeline. What it does is collapses Vim/NeoVim statusline into the tmux’s statusline, freeing prescious pixels.

To sum this up, here is my recipe for saving pixels when working with NeoVim inside tmux:

-- init.lua
vim.opt.cmdheight = 0
...
{
  "vimpostor/vim-tpipeline",
}
# .tmux.conf
set -g focus-events on
set -g status-style bg=default
set -g status-justify left

And bonus points if you are not using some kind of tabbar plugin.

Some people use Zen mode plugins (folke/zen-mode.nvim, pocco81/true-zen.nvim) to free-up the space, but I think real Zen is when you don’t need a Zen plugin.

More posts in NeoVim Config series:

There is nothing in here at the moment