this post was submitted on 17 Jun 2024
1 points (100.0% liked)

VS Code

773 readers
1 users here now

founded 1 year ago
MODERATORS
 

I need to be able to see the difference between the current working file and the previous commit as I am editing the file. The only history plugins I can find either use pop-ups (which disappear when I start typing) or a dedicated diff-view which takes up too much space on my small monitor.

top 2 comments
sorted by: hot top controversial new old
[–] Lodra@programming.dev 0 points 3 months ago (1 children)

I think GitLens has some features based on git diff , though I haven’t personally explored them much. Note that many of its features are locked behind a paid license. They’ll give a trial though to test everything for free. But the free features are definitely quite nice!

[–] orac@feddit.nl 1 points 3 months ago* (last edited 3 months ago)

I tried that, it has different ways of looking at a diff/history, but none where you can just have it open while still working (unless you do split I suppose, but that is not practical as I need to go through hundreds of files. But perhaps it helps if I describe the problem. Maybe there is another solution I am not thinking of: I have almost 2000 files that all have had 1 change (so there is an initial commit and a recent version). What I need to do is go through each file and add the changes made to the file as a comment. So what I would like is: When I open a file, see immediately which lines were changed., and then be able to see what it was that changed so I can either copy/paste or retype it as a comment. Each change I review and I either add a #ACCEPTED, #DENIED or a #REVIEW to the comment as well.

So having to switch to different views and opening/closing tabs for each file is something I would like to avoid. Just open the file, see what I need, type and close the file again.