Changes between Version 2 and Version 3 of Programming/Python/MercurialDiffsWithVimOnWindows


Ignore:
Timestamp:
Dec 29, 2016, 3:10:43 AM (4 years ago)
Author:
Vijay Varadan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Programming/Python/MercurialDiffsWithVimOnWindows

    v2 v3  
    1515opts.vdiff=-f '+next' '+execute "DirDiff" fnameescape(argv(0)) fnameescape(argv(1))'
    1616}}}
    17 If you try using the above changes as are on Windows, all you'll end up with is vim opening 7 empty buffers with names corresponding to the parts of opt.vdiff that follow the -f parameter. This happens because of differences between the way bash and cmd.exe treat single quotes and escaping. This part was relatively easy to figure out especially with the use of the --debug option to mercurial like this: <code>hg --debug vdiff</code>, which tells you exactly how the command line is invoked.
     17If you try using the above changes as are on Windows, all you'll end up with is vim opening 7 empty buffers with names corresponding to the parts of opt.vdiff that follow the -f parameter. This happens because of differences between the way bash and cmd.exe treat single quotes and escaping. This part was relatively easy to figure out especially with the use of the --debug option to mercurial like this: ```hg --debug vdiff```, which tells you exactly how the command line is invoked.
    1818
    1919So what I tried next was to replace the single quotes with double quotes and escaping the double quotes surrounding !DirDiff, like so: