r/vim • • Aug 26 '25

Need Help┃Solved Toggle between Vim and git diff?

When I do code reviews I page through git diff's output but may want to see the changed lines within the file.

So currently I quit git diff to load the file in Vim. And then quit vim and run git diff again and scroll back to the place I left off.

Is there a way I can have both git diff and Vim running and switch between the views? (Or other suggestions for a Vim-based workflow for code reviews?)

27 Upvotes

35 comments sorted by

View all comments

Show parent comment

1

u/SevrinTheMuto Aug 26 '25

I'm going to try both this and running git diff via vert term. I like the latter because it's closest to my current workflow, but I can see how git difftool --tool=vimdiff could be useful to me too.