Incorrect colors with vim in iTerm2 using Solarized

后端 未结 11 1109
傲寒
傲寒 2020-12-07 07:43

I am having a strange issue with iTerm2, in terminal vim (non-gui) and the solarized color scheme. First, I have set iTerm2 to use the dark solarized colour scheme.

11条回答
  •  一向
    一向 (楼主)
    2020-12-07 08:02

    This worked for me in OS X 10.9.1 in iTerm 2 as well as Terminal. One mistake I was making was putting the colorscheme declaration before the termtrans and termcolors settings (and I needed both of these to make it work). As others have said, I set my terminal type to xterm-256color

    if !has("gui_running")
        let g:solarized_termtrans=1
        let g:solarized_termcolors=256
    endif
    
    colorscheme solarized
    set background=dark
    

提交回复
热议问题