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

  • 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
again, keep the text highlighted on the left side

--

--

Infrastructure Support Engineer/Technical Writer (snowplow.io) with a passion for Python/writing documentation. More about me: https://pavol.kutaj.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pavol Kutaj

Infrastructure Support Engineer/Technical Writer (snowplow.io) with a passion for Python/writing documentation. More about me: https://pavol.kutaj.com