Created
November 19, 2023 22:51
-
-
Save seandewar/bfc413f2f3d50aa15e96bf25351e2105 to your computer and use it in GitHub Desktop.
Remove all Neovim statuslines and add a window separator at the bottom of the screen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Quick 'n dirty Vim script for Neovim that removes all statuslines and creates | |
" a global statusline acting as a fake window separator. | |
" Also sets 'cmdheight' to 0. | |
hi! link StatusLine WinSeparator | |
hi! link StatusLineNC WinSeparator | |
func! Stl() abort | |
let hc = &ambw == 'single' ? '─' : '-' | |
let uc = &ambw == 'single' ? '┴' : '-' | |
let str = '' | |
for w in range(1, winnr('$')) | |
if win_gettype(w) ==# 'popup' | break | endif | |
let info = getwininfo(win_getid(w))[0] | |
if info.winrow + info.height + info.winbar < &lines - &ch | |
continue | |
endif | |
let str ..= hc->repeat(info.width) .. uc | |
endfor | |
return str[:-len(uc) - 1] | |
endfunc | |
set ch=0 ls=3 stl=%!Stl() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment