Corey Hart
Corey Hart

Reputation: 10596

SVN Diff Coloring into Vim

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?

Upvotes: 0

Views: 1602

Answers (3)

Gadolin
Gadolin

Reputation: 2686

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.

Upvotes: 0

tangens
tangens

Reputation: 39733

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

:set syntax=off

Upvotes: 2

Kamil Kisiel
Kamil Kisiel

Reputation: 20451

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

Upvotes: 1

Related Questions