0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VS Code を利用したテキストの差分比較手順 自分用メモ (Compare Active File Wit)

0
Last updated at Posted at 2026-06-25

ログや出力結果の比較、原因調査、コピペコードの差分確認などで頻度は多くないものの、たまにテキストの差分比較をしたいときがあります。
社内で外部ツールなどの使用が制限されているため VS Code で確認をしているんですが頻度が少ないのもあり毎回 「あれ、どうやってやるんだっけ」状態になるのでそんなときようの備忘録です。

VS Code を利用していてテキストの差分比較をする際に参考になっていいただけると嬉しいです。

VS Code を利用したテキストの差分比較手順

  1. VS Code で比較した 2 つのテキストを用意します。
    Screenshot from 2026-06-25 18-37-21.png
  2. [Ctrl + Shift + P] を押します。
  3. "Compare Active file with..." を入力し [ファイル:アクティブ ファイルを比較しています…] を選択します。
  4. 比較したいテキストのタブを選択します。
    ※ 現在は Untitled-1 を開いている状態なので Untitled-2 を選択します。
    Screenshot from 2026-06-25 18-46-14.png
  5. 差分比較結果のタブが出ます。
    Screenshot from 2026-06-25 18-47-12.png

備考

わたしはテキストの差分比較しかしたことがなかったのですが、この記事を書く際にいろいろ調べてみたところファイルの比較もできるようです。
ファイルの比較をしたい場合には下記記事参考にしていただければと思います。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?