VS Code Extensions
Show History for Selected Code

Show History for Selected Code

by menincode

IntelliJ-style Show History for Selection in VS Code: view Git history for selected lines with side-by-side parent vs revision diff.

Downloads

116

Rating

4.0 / 5 (1)

Version

0.2.2

Last updated

May 03, 2026

Show History for Selection lists Git commits that touched your current selection, then opens a side-by-side diff of parent vs selected revision for the same file.

Features

  • Commit list scoped to the selected lines (per-line union + range trace)
  • Resizable Commits panel (drag the handle above the list; height is remembered)
  • Full commit message in a modal (click Commit Message) or hover preview
  • Scroll sync between Parent and Revision panes

Requirements

  • Git on your PATH
  • File saved on disk and tracked by Git

Usage

  1. Open a file in a Git repository.
  2. Select one or more lines (or place the cursor on a single line).
  3. Run Show History for Selection:
    • Command Palette (Ctrl+Shift+P / Cmd+Shift+P), or
    • Editor context menu.
  4. Pick a commit in the list to load the diff. Drag the horizontal bar above Commits to change the list height.

Contributing & issues

Use the repository linked on the Marketplace page.

License

MIT — see LICENSE.

Related extensions