How to Compare Highlighted Text With Copied Text in Visual Studio Code
The aim of this page📝 is to show a feature that is often used, but slightly hidden in vscode — the diff between only a selection within a larger file with the copied text.
As I am doing most of my operation work (todo list via git, thinking via markdown, coding in python/bash) in VSCode, I am using this feature quite often
OOTB request dismissed
- This was closed Feature Request: Compare editor selection with Clipboard · Issue #51009 · microsoft/vscode in favor of using an extension
- Indeed, install Partial Diff — Visual Studio Marketplace
Executed with PartialDiff in a little uncomfortable fashion
- Highlight the text within VSCode
- Run PartialDiff: Select Text for Compare
- Here is the uncomfortable bit: Don’t remove the highlight within VSCode — even as you change applications!
- Copy whatever you need to compare elsewhere
- Run _PartialDiff: Compare Text with Clipboard