patch 9.1.1753: defaults: 'diffopt' option value can be improved

Problem:  defaults: 'diffopt' option value can be improved
Solution: Update diffopt defaults to include "indent-heuristic" and
          "inline:char" (Yee Cheng Chin)

The default diff options have not been updated much despite new
functionality having been added to Vim.

- indent-heurstic: This has been enabled by default in Git since
  33de716387 in 2017. Given that Vim uses xdiff from Git, it makes sense
  to track the default configuration from Git.

- inline:char: This turns on character-wise inline highlighting which is
  generally much better than the default inline:simple. It has been
  implemented since #16881 and we have not seen reports of any issues
  with it, and it has received good feedbacks.

closes: #18255

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yee Cheng Chin
2025-09-11 15:02:21 -04:00
committed by Christian Brabandt
parent b49d695fbc
commit 976b365305
12 changed files with 88 additions and 26 deletions

View File

@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.1. Last change: 2025 Sep 10
*version9.txt* For Vim version 9.1. Last change: 2025 Sep 11
VIM REFERENCE MANUAL by Bram Moolenaar
@ -41670,6 +41670,8 @@ Default values: ~
- the default value for 'showcmd' is always enabled when using non-compatible
mode (previously, it was off on UNIX systems) and consequently removed from
|defaults.vim|
- Improve the diff experience by updating the 'diffopt' default value to
"internal,filler,closeoff,indent-heuristic,inline:char".
Completion: ~
- allow to complete directories from 'cdpath' for |:cd| and similar commands,