diff options
Diffstat (limited to 'runtime/doc/diff.txt')
-rw-r--r-- | runtime/doc/diff.txt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt index e3d8f53c46..d72f37ea4f 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -1,4 +1,4 @@ -*diff.txt* For Vim version 8.2. Last change: 2021 May 24 +*diff.txt* For Vim version 8.2. Last change: 2022 Jan 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -335,8 +335,9 @@ After setting this variable, reload the syntax script: > FINDING THE DIFFERENCES *diff-diffexpr* -The 'diffexpr' option can be set to use something else than the standard -"diff" program to compare two files and find the differences. *E959* +The 'diffexpr' option can be set to use something else than the internal diff +support or the standard "diff" program to compare two files and find the +differences. *E959* When 'diffexpr' is empty, Vim uses this command to find the differences between file1 and file2: > @@ -369,7 +370,7 @@ format mentioned. These variables are set to the file names used: v:fname_in original file v:fname_new new version of the same file - v:fname_out resulting diff file + v:fname_out where to write the resulting diff file Additionally, 'diffexpr' should take care of "icase" and "iwhite" in the 'diffopt' option. 'diffexpr' cannot change the value of 'lines' and @@ -402,7 +403,9 @@ If the 'diffexpr' expression starts with s: or |<SID>|, then it is replaced with the script ID (|local-function|). Example: > set diffexpr=s:MyDiffExpr() set diffexpr=<SID>SomeDiffExpr() -< +Otherwise, the expression is evaluated in the context of the script where the +option was set, thus script-local items are available. + *E810* *E97* Vim will do a test if the diff output looks alright. If it doesn't, you will get an error message. Possible causes: @@ -458,5 +461,8 @@ If the 'patchexpr' expression starts with s: or |<SID>|, then it is replaced with the script ID (|local-function|). Example: > set patchexpr=s:MyPatchExpr() set patchexpr=<SID>SomePatchExpr() -< +Otherwise, the expression is evaluated in the context of the script where the +option was set, thus script-local items are available. + + vim:tw=78:ts=8:noet:ft=help:norl: |