Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the white bar at top of screen in Vim?

Tags:

vim

vi

To recreate, do :set background=dark, and you’ll see it on top of the screen. I’m using the railscasts theme, but I don’t think it has anything to do with that.

Screenshot

like image 481
sent-hil Avatar asked May 02 '11 06:05

sent-hil


2 Answers

Setting background=dark is not enough to show the tabline, you should start recreation with vim -u NONE.

By default tabline does not appear unless there is more then one tab. This behavior is controlled by showtabline option which defaults to 1. 0 switches off tabline even if there is more then one tab, 2 makes tabline to be shown even if there is only one tab. Try verbose set showtabline? to find out what script replaced showtabline=1 with showtabline=2.

like image 142
ZyX Avatar answered Sep 28 '22 02:09

ZyX


It's the tabline which is not dealt with by the railscasts colorscheme. If you want the tabline but don't want it to be white you'll need to edit your colorscheme to your liking.

Start by adding the following:

hi TabLine      guifg=<hexadecimal color> guibg=<hexadecimal color>
hi TabLineFill  guifg=<hexadecimal color> guibg=<hexadecimal color> gui=reverse
hi TabLineSel   guifg=<hexadecimal color> guibg=<hexadecimal color> gui=bold
hi Title        guifg=<hexadecimal color> guibg=<hexadecimal color> gui=bold

These are specific to GVim/MacVim, to make it work in the terminal, you'll need to add

ctermfg=<color number> ctermbg=<color number> cterm=<value>

to each line.

See :help colorscheme.

like image 24
romainl Avatar answered Sep 28 '22 02:09

romainl