2

How can I remove the horrible color of my vim status bar has? I'd like it to be the same color as the background.

enter image description here

My current settings in my ~./.vimrc file (or ~/.vimrc.after file as I use) which relate to the status bar are:

set laststatus=2                            " Show the last status
hi statusline guibg=#263238

set statusline=%f                           " Filename

function! InsertStatuslineColor(mode)
  if a:mode == 'i'
    hi statusline guibg=#573E81 guifg=#263238
  elseif a:mode == 'r'
    hi statusline guibg=blue guifg=#263238
  else
    hi statusline guibg=red guifg=#263238
  endif
endfunction

au InsertEnter * call InsertStatuslineColor(v:insertmode)
au InsertChange * call InsertStatuslineColor(v:insertmode)
au InsertLeave * hi statusline guibg=#c5c8c6 guifg=#263238

" default the statusline to green when entering Vim
hi statusline guibg=#c5c8c6 guifg=#263238

I am using MacVim v7.4 (88).

Oli
  • 21
  • 1
  • 2

2 Answers2

3

There are several places in the code where you specifically set the statusline background to a sort of grayish colour with commands like:

hi statusline guibg=#c5c8c6 ...

You need to replace these with lines like:

hi statusline guibg=NONE ...

...to remove the colour.

If your statusline background still isn't correct you might have also have reverse set. Check if the output of :hilight statusline contains gui=reverse.

If so, you will also need to clear this setting, like so:

hi statusline guibg=NONE gui=NONE ...

See :help :highlight for further details.

Rich
  • 31,891
  • 3
  • 72
  • 139
0

In vim, typing


highlight clear StatusLine

worked for me

fuadnafiz98
  • 101
  • 1