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 fo开发者_开发技巧rce syntax highlighting in a text file?
It's a vim syntax highlighting. You can turn it off inside vim with the command
:set syntax=off
Vim has a syntax highlighting plugin for the diff format. There's no color codes actually in the diff file.
Another sort of solution, vimdiff:
svn cat file > tmp
or less (without writing to file)
vimdiff tmp 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.
精彩评论