Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there any way to quickly disable/enable color coding in vimdiff ? The problem is, I have colored text in vim and the text is invisible is the text-color is Red, and the vimdiff too tries to put a background color of Red, making it hard to read.

So, I would like to disable the color coding for sometime, for verifying the text and re-enable it later. Any quick, easy way to do this?

share|improve this question
    
Related: Load a different vimdiff color scheme –  belacqua Sep 10 '13 at 17:46
add comment

4 Answers

up vote 6 down vote accepted

You can easily deactivate the coloring in vim

:diffoff!

And to turn it on again

:windo diffthis
share|improve this answer
    
This seems a lot more cumbersome than to just simply turn off the syntax highlighting directly with the appropriate command: :syntax off. Edit: never mind, this is for diff coloring, rather than syntax highlighting. Carry on. :-) –  Victor Apr 17 at 9:55
add comment

put this in your .vimrc:

if !&diff
    syntax enable
endif

what it does is only enable syntax highlighting if you don't start in diff mode.

share|improve this answer
add comment

TERM=vt100 vimdiff should invoke vimdiff with a TERM temporarily set to vt100. (until the command finishes). This makes it easy to try others : xterm or xterm-color or xterm-256color , etc.

share|improve this answer
add comment

Syntax highlighting in vim can be turned off/on with :syntax off and :syntax on.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.