tags:

views:

49

answers:

3
svn diff somefile > check.txt

When pushing svn diff into a text file, the output maintains the text coloring when viewing within vim. Is this a vim plugin that was installed with svn, or are their special character encodings to force syntax highlighting in a text file?

+1  A: 

Vim has a syntax highlighting plugin for the diff format. There's no color codes actually in the diff file.

Kamil Kisiel
+3  A: 

It's a vim syntax highlighting. You can turn it off inside vim with the command

:set syntax=off
tangens
A: 

Another sort of solution, vimdiff:
svn cat file > tmp
vimdiff tmp file
or less (without writing to file) svn diff file | less -R
I like the last one because then I don't need to care about temporary files. This kind of operation when needed, rarely I need to put diff into the file.

Gadolin