Why colors are not displaying in VIM - OH-MY-ZSH
18,297
Test to see whether syntax highlighting is enabled in Vim. If you type :syntax on
and the problem goes away then that's your issue, and you can correct it by adding:
syntax on
to your $MYVIMRC
file (usually at ~/.vimrc
or ~/.vim/vimrc
; find out exactly with :echo $MYVIMRC
in Vim).
Related videos on Youtube
Author by
Earon
Updated on June 04, 2022Comments
-
Earon almost 2 years
I have seen this post :
oh-my-zsh themes don't show properly (background stays white)
But nothing helped.
Problem is in MAC VIM Colors are displaying messed but in linux all colors are working fine.
I am using iTerm 2 as in tutorial but here's how colors are showing.
Why this is not working ?
I think it should be link this :
Here are my settings in iTerm2
-
Andreas Louv almost 8 yearsMaybe you need
set t_Co=256
if you use a 256 colors scheme but your terminal doesn't tell vim it supports 256 colors.
-
-
floatingpurr over 5 yearsIf I type
:syntax on
it works. But I have no variable$MYVIMRC
for a permanent fix. -
kemicofa ghost about 5 yearsHow to permanently have
:syntax on
? Do I have to type it every time? -
Arun Gopalpuri about 5 yearsJust create a file ~/.vimrc and
syntax on
to it and save. It worked for me even though I didn't have any variable $MYVIMRC -
kramfs over 3 yearsThanks, syntax on is definitely NOT enabled. Adding that in the ~/.vimrc file solved it.