How do I change the colour of the statusline of the currently focused window?

I've seen colorschemes modify this. Is this some sort of highlight group? Or something else?


You can change it in your vimrc. The currently focused window is highlight group Statusline, other windows are StatuslineNC.

Example for terminal Vim:

hi StatusLine                  ctermfg=8     ctermbg=2     cterm=NONE
hi StatusLineNC                ctermfg=2     ctermbg=8     cterm=NONE

For the GUI, use guifg and guibg.

  • gvim defaults for StatusLine are: term=bold,reverse cterm=bold,reverse gui=bold,reverse, and for StatusLineNC the values are term=reverse cterm=reverse gui=reverse
    – roblogic
    Mar 4 '15 at 2:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.