How do I turn vi colors off? I was using vim-tiny on on Ubuntu 14.04. Installed vim-nox. Version is version 7.4.52. Once I installed that, I got all these syntax colors by default. I have my Terminal set to a black background with bright green text. Now when I use vi with the colors, some of the text is unreadable against the dark background. I would rather just turn the colors off. How do I do this?
You can use:
:set t_Co=0
This will tell Vim that you're not using a colour terminal. The difference with using :syntax off
is that this will still enable some syntax highlighting features with bold, underlined, and "reverse video".
-
1Hmm... I think I still want to see bold. I think I was able to see bold and some other formats with vim-tiny, so I wouldn't want to completely lose functionality. Thanks for your helpful answer. – gracious1 Apr 3 '16 at 9:22
-
@gracious1 This will enable bold/underline,
:syntax off
*won't. ;-) – Martin Tournoij Apr 3 '16 at 13:46 -
Just discovered this after viewing /etc/vim/vimrc
for the first time. Uncommenting the line "set background=dark
" in vimrc
solves my readability problem also. It changes the syntax colors so that they are distinguishable against my black background! This is actually better than what I had hoped for in the original question!
(Presumably :set background=dark
would have worked, too? Or something like that?)
-
1Yes,
:set background=dark
would have worked. You could add that to~/.vimrc
or~/.vim/vimrc
as well, instead of modifying files in/etc
. – muru Apr 3 '16 at 14:44
You can disable syntax highlighting by doing:
:syntax off
To turn it back on:
:syntax enable
:color
and tab through the possible arguments. I use a black background for my terminal (with gray text) and I personally like thedesert
theme. – Shahbaz Apr 3 '16 at 5:26/etc/vim/vimrc
hassyntax on
. – Martin Tournoij Apr 3 '16 at 13:48/etc/vim/vimrc
doesn't. Looks like @Carpetsmoker was right. – muru Apr 3 '16 at 14:29