Home Explore Blog CI



neovim

32th chunk of `runtime/doc/options.txt`
4d85278808f6f11a3e94efcf33f999a9539de950df9dfae50000000100000fa1
	internal diff engine. Currently supported
				algorithms are:
				myers      the default algorithm
				minimal    spend extra time to generate the
					   smallest possible diff
				patience   patience diff algorithm
				histogram  histogram diff algorithm

		closeoff	When a window is closed where 'diff' is set
				and there is only one window remaining in the
				same tab page with 'diff' set, execute
				`:diffoff` in that window.  This undoes a
				`:diffsplit` command.

		context:{n}	Use a context of {n} lines between a change
				and a fold that contains unchanged lines.
				When omitted a context of six lines is used.
				When using zero the context is actually one,
				since folds require a line in between, also
				for a deleted line. Set it to a very large
				value (999999) to disable folding completely.
				See |fold-diff|.

		filler		Show filler lines, to keep the text
				synchronized with a window that has inserted
				lines at the same position.  Mostly useful
				when windows are side-by-side and 'scrollbind'
				is set.

		foldcolumn:{n}	Set the 'foldcolumn' option to {n} when
				starting diff mode.  Without this 2 is used.

		followwrap	Follow the 'wrap' option and leave as it is.

		horizontal	Start diff mode with horizontal splits (unless
				explicitly specified otherwise).

		hiddenoff	Do not use diff mode for a buffer when it
				becomes hidden.

		iblank		Ignore changes where lines are all blank.  Adds
				the "-B" flag to the "diff" command if
				'diffexpr' is empty.  Check the documentation
				of the "diff" command for what this does
				exactly.
				NOTE: the diff windows will get out of sync,
				because no differences between blank lines are
				taken into account.

		icase		Ignore changes in case of text.  "a" and "A"
				are considered the same.  Adds the "-i" flag
				to the "diff" command if 'diffexpr' is empty.

		indent-heuristic
				Use the indent heuristic for the internal
				diff library.

		inline:{text}	Highlight inline differences within a change.
				See |view-diffs|.  Supported values are:

				none    Do not perform inline highlighting.
				simple  Highlight from first different
					character to the last one in each
					line.  This is the default if no
					`inline:` value is set.
				char    Use internal diff to perform a
					character-wise diff and highlight the
					difference.
				word    Use internal diff to perform a
					|word|-wise diff and highlight the
					difference.  Non-alphanumeric
					multi-byte characters such as emoji
					and CJK characters are considered
					individual words.

		internal	Use the internal diff library.  This is
				ignored when 'diffexpr' is set.  *E960*
				When running out of memory when writing a
				buffer this item will be ignored for diffs
				involving that buffer.  Set the 'verbose'
				option to see when this happens.

		iwhite		Ignore changes in amount of white space.  Adds
				the "-b" flag to the "diff" command if
				'diffexpr' is empty.  Check the documentation
				of the "diff" command for what this does
				exactly.  It should ignore adding trailing
				white space, but not leading white space.

		iwhiteall	Ignore all white space changes.  Adds
				the "-w" flag to the "diff" command if
				'diffexpr' is empty.  Check the documentation
				of the "diff" command for what this does
				exactly.

		iwhiteeol	Ignore white space changes at end of line.
				Adds the "-Z" flag to the "diff" command if
				'diffexpr' is empty.  Check the documentation
				of the "diff" command for what this does
				exactly.

		linematch:{n}   Align and mark changes between the most
				similar lines between the buffers. When the
				total number of lines in the diff hunk exceeds
				{n}, the lines will not be aligned because for
				very large diff hunks there will be a
				noticeable lag. A reasonable setting is
				"linematch:60", as this will enable alignment
				for a 2 buffer diff hunk of 30 lines each,
				or a 3 buffer diff hunk of 20 lines

Title: Detailed 'diffopt' Options: Algorithms, Context, Inline Highlighting, and More
Summary
This section describes the various settings available within the 'diffopt' option, which fine-tunes the behavior of Vim's diff mode. It covers selecting diff algorithms (myers, minimal, patience, histogram), adjusting context lines around changes, showing filler lines for synchronized scrolling, configuring the foldcolumn, specifying horizontal splits, ignoring blank or case differences, using indent heuristics, highlighting inline differences (none, simple, char, word), using the internal diff library, ignoring whitespace changes, and aligning similar lines between buffers using the linematch feature.