Compare Files Quickly In Vscode

Pavol Kutaj
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

  1. Open or focus target-file
  2. Open or focus source-file.
  3. Press ctrl+shift+alt+c → a quick open menu will be shown with target-file focused.
  4. Press Enter.
  • Result: source-file on left and target-file on right

5. Proceed with alt+f5 and return with shift+alt+f5

3. sources

--

--

No responses yet