开发者

SVN Diff Coloring into Vim

开发者 https://www.devze.com 2023-01-17 16:40 出处:网络
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 thei
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
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.

0

精彩评论

暂无评论...
验证码 换一张
取 消