I would like to use the difftastic diff tool, which ignores whitespace changes in code (amongst other useful functionalities), and I have set my .gitconfig
to use difft
(the binary file of difftastic) as my preferred external diff tool using this command:
git config --global diff.external difft
And, my .gitconfig
has these lines in it:
[diff]
external = difft
However, the VSCode text editor still shows whitespace diffs. I have searched for a way to change the diff tool in VSCode to no avail, the only results are "How to set VSCode as the default merge/diff tool for git".
To clarify, I would like to change the diff tool used by the vscode text editor section as well as the diff viewer. I do not want to change the tool used by the commandline git
command itself. In the image I've linked, it shows changes for whitespace, which should not be happening if difft
is set as the diff tool.
You can change the tool Git uses to "diff" two files: https://git-scm.com/docs/git-difftool (this is Git functionality - it has nothing directly to do with VSCode).
You can substitute a custom editor for the built-in the Visual Studio code editor: https://code.visualstudio.com/api/extension-guides/custom-editors.
You can add a custom "diff" plugin to Visual Studio, for example, "Partial Diff": https://marketplace.visualstudio.com/items?itemName=ryu1kn.partial-diff.
What you CANNOT do is swap in a custom app to change the "diff" functionality of the default VSCode editor.