Saving pixels in NeoVim
Maximizing the editor area in NeoVim
Ivan Elfimov, 2024-03-16, 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:
- NeoVim Telescope Keymap Mnemonic 2023-12-07
- Plugins from Trixy NeoVim distro 2023-09-17
- NeoVim and Keyboard Layouts 2023-09-04
- New NeoVim plugin - mini.clue 2023-08-04
- Not so obvious NeoVim key mappings 2023-07-21
- New series: NeoVim config 2023-07-20