Diff 2 opened files with ease. Because running code --diff path1 path2
is too slow.
Follow the instructions in the Marketplace, or run the following in the command palette:
ext install fabiospampinato.vscode-diff
It adds 1 command to the command palette:
'Diff: File' // Diff the current file against another one
{
"diff.exclude": null, // An array of globs to exclude, unless specificed it uses the "files.exclude" setting
"diff.ignore": [".gitignore"], // An array of names for .gitignore-like files to use
"diff.include": ["**/*"], // An array of globs to include
"diff.showUntitledFiles": true, // Whether to show untitled files in the selector or not
"diff.showOpenFiles": true, // Whether to show open files at the top of the selector or not
"diff.showFoundFiles": true, // Whether to show other found files in the selector or not
"diff.showFoundRelativeFiles": false // Whether to show other found files, using relative paths, in the selector or not
}
- Diff against previous versions: sometimes diffing against open files is not what you want, try Git File History for diffing against previous versions of the current file.
MIT © Fabio Spampinato