Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

help - change diff symbol "<", "|" or ">" to a desired one?

Tags:

linux

vim

diff

diff -w command is used to create a side by side comparison diff file (instead of parallel)
i then view them using vi via ssh terminal the changes are indicated by either "<" or "|" or ">"
Since the file i am viewing is a source code, navigating to changes alone
using above symbols is difficult since they are also in C source code.

How can i change these default symbols to desired ones ?
Kindly help. Thanks.

like image 526
basilbc Avatar asked Dec 29 '10 03:12

basilbc


1 Answers

Instead of viewing the output of diff -w in vim, you can use vim's built-in diff:

vim -d file1 file2

This opens vim in a vertical split with both files open, and diff markings in the code. This is what it looks like:

alt text

And it works in a terminal too:

alt text

You can find a short tutorial here

like image 51
Nathan Fellman Avatar answered Nov 14 '22 20:11

Nathan Fellman