Skip to content

Instantly share code, notes, and snippets.

@seandewar
Created November 19, 2023 22:51
Show Gist options
  • Save seandewar/bfc413f2f3d50aa15e96bf25351e2105 to your computer and use it in GitHub Desktop.
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.
" 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