I'm trying to format my statusline in macvim.
The formatting works fine, and the status line reflects the following code (stored at ~/.vimrc
), but not in regard to the color settings. It displays as default color until i :so ~/.vimrc
after which everything is as it should be.
What's the problem?
set laststatus=2
hi statusline guibg=#ffaa00 guifg=#000000
hi StatusLineLeft guibg=#ffaa00 guifg=#000000
hi StatusLineRight guibg=#000000 guifg=#ffaa00
hi StatusLineWrap guibg=#000000 guifg=#ff4400
hi StatusLineGrey guibg=#000000 guifg=#444444
set statusline=
set statusline+=%#StatusLineLeft#
set statusline+=%.28F " Path to the file
set statusline+=\ " just a space
set statusline+=%#StatusLineRight#
set statusline+=%= " Switch to the right side
set statusline+=%#StatusLineGrey#
set statusline+=\ [%b][0x%B]\ " byte under the curror
set statusline+=%#StatusLineRight#
set statusline+=%l " Current line
set statusline+=/ " Separator
set statusline+=%L " Total lines