@@ -39,7 +39,9 @@ The second and following arguments may also be a directory name. Vim will
39
39
then append the file name of the first argument to the directory name to find
40
40
the file.
41
41
42
- This only works when a standard "diff" command is available. See 'diffexpr' .
42
+ By default an internal diff library will be used. When 'diffopt' or
43
+ 'diffexpr' has been set an external "diff" command will be used. This only
44
+ works when such a diff program is available.
43
45
44
46
Diffs are local to the current tab page | tab-page | . You can't see diffs with
45
47
a window in another tab page. This does make it possible to have several
@@ -344,8 +346,9 @@ between file1 and file2: >
344
346
345
347
The ">" is replaced with the value of 'shellredir' .
346
348
347
- The output of "diff" must be a normal "ed" style diff. Do NOT use a context
348
- diff. This example explains the format that Vim expects: >
349
+ The output of "diff" must be a normal "ed" style diff or a unified diff. Do
350
+ NOT use a context diff. This example explains the format that Vim expects for
351
+ the "ed" style diff: >
349
352
350
353
1a2
351
354
> bbb
@@ -384,12 +387,16 @@ Example (this does almost the same as 'diffexpr' being empty): >
384
387
endif
385
388
silent execute "!diff -a --binary " . opt . v:fname_in . " " . v:fname_new .
386
389
\ " > " . v:fname_out
390
+ redraw!
387
391
endfunction
388
392
389
393
The "-a" argument is used to force comparing the files as text, comparing as
390
394
binaries isn't useful. The "--binary" argument makes the files read in binary
391
395
mode, so that a CTRL-Z doesn't end the text on DOS.
392
396
397
+ The `redraw ! ` command may not be needed, depending on whether executing a
398
+ shell command shows something on the display or not.
399
+
393
400
*E810* *E97*
394
401
Vim will do a test if the diff output looks alright. If it doesn't, you will
395
402
get an error message. Possible causes:
0 commit comments