Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set "hg diff" output shows in gvim?

I use mercurial and I want to see modified change in Vim or GVim. Normally there is hg diff which show the modified changes in diff format. but I want to see it in Vim as the original version and modified version side-by-side.

I try extdiff in ExtdiffExtension but it doesn't work and gvim open some blank file.

I know there is gvim -d localfile otherfile but I don't know how to config mercurial.

like image 810
teerapap Avatar asked Jan 25 '10 08:01

teerapap


1 Answers

If you're fine with vim, I'm been using this in my ~/.hgrc for months without problems

[extensions]
hgext.extdiff =

[extdiff]
cmd.vimdiff =

[alias]
vi  = vimdiff
vim = vimdiff

Then you just use

hg vimdiff somefile

The [alias] section is optional, but it's nice to have.

I'm using v1.4.2, FWIW.

like image 200
permanuno Avatar answered Oct 07 '22 13:10

permanuno