Compare Files Quickly In Vscode
1 min readApr 23, 2021
the case
the question is, how to quickly compare two files in vscode and ideally, merge changes when needed
- I used beyond compare at the moment to do this kind of work more fluently
1. config
- color settings to work properly on my theme (Community Material Theme Ocean High Contrast)
"workbench.colorCustomizations": { "diffEditor.removedTextBackground": "#FF000050", "diffEditor.insertedTextBackground": "#ffff0035", ...}
- I found a flow that is fastest for me, by first associating a keyboard shortcut
ctrl+shift+alt+c
to Compare Active File With…
2. steps
- Open or focus target-file
- Open or focus source-file.
- Press
ctrl+shift+alt+c
→ a quick open menu will be shown with target-file focused. - Press Enter.
- Result: source-file on left and target-file on right
5. Proceed with alt+f5
and return with shift+alt+f5