1
0
mirror of https://github.com/jbranchaud/til synced 2026-07-08 18:10:33 +00:00

Add Jump Between Changes In Git Diff View as a VSCode TIL

This commit is contained in:
jbranchaud
2026-07-07 14:53:52 -05:00
parent f02337a5e7
commit d39156d424
2 changed files with 25 additions and 1 deletions
+2 -1
View File
@@ -10,7 +10,7 @@ working across different projects via [VisualMode](https://www.visualmode.dev/).
For a steady stream of TILs, [sign up for my newsletter](https://visualmode.kit.com/newsletter).
_1812 TILs and counting..._
_1813 TILs and counting..._
See some of the other learning resources I work on:
@@ -2048,6 +2048,7 @@ If you've learned something here, support my efforts writing daily TILs by
- [Advance Through Search Results](vscode/advance-through-search-results.md)
- [Enable Breadcrumbs For Version 1.26 Release](vscode/enable-breadcrumbs-for-version-126-release.md)
- [Find The Location Of User Settings JSON File](vscode/find-the-location-of-user-settings-json-file.md)
- [Jump Between Changes In Git Diff View](vscode/jump-between-changes-in-git-diff-view.md)
- [Jump To Problems In The Current File](vscode/jump-to-problems-in-the-current-file.md)
- [Open An Integrated Terminal Window](vscode/open-an-integrated-terminal-window.md)
- [Open File On Remote Like GitHub](vscode/open-file-on-remote-like-github.md)
@@ -0,0 +1,23 @@
# Jump Between Changes In Git Diff View
I'm viewing a diff of changes to a large `db/structure.sql` file. Most of the
changes are single line edits and dispersed across the entire file. I can see
the green change markers showing up as an overlay to the scrollbar. However it
is hard to scroll directly to any given change because of how many lines are in
this file.
Instead I opened up the file in the Version Control/Git extension which shows a
_Working Copy_ diff. It's still hard to manually scroll to the specific changes.
This view does offer controls for jumping from one change to the next (and back
again). Up and Down arrow buttons appear at the top of the window for that
purpose.
There are also keybindings for this. `Option-F5` will jump to the next diff in
the current file. `Shift-Option-F5` will jump to the previous one.
These keybindings make it much easier to jump between changes in a massive file
like this so that I can quickly review everything before proceeding.
Note: I could have also switched over to the terminal and run `git diff --
db/structure.sql`. The above has the added benefit of being directly in the
context of the editor where I can make inline changes if needed.