Reputation: 408
I'm new to VSCode and can't find online if is possible to have my favorite diff view mode: I want to see only the lines changed - and the closer ones - not the entire file with the highlighting of the changes.
E.g.: in the image I've deleted\added 2 lines: one at 8 and one at 90. I'd like to see only those changes, not the entire file.
Thanks
Upvotes: 20
Views: 15963
Reputation: 31107
edit: there is now a button, in the toolbar at the top, to collapse/uncollapse unchanged parts of the file (even if you are still in a real text editor):
previous (no more accurate) answer:
I think that's not possible because what is provided here is a real text editor where you can edit the content of the file.
With the toolbar at the top...
... you could still:
Alt+Shift+f5
/Alt+f5
)Upvotes: 12
Reputation: 341
Add these properties in the settings.json file and restart VS Code.
"diffEditor.experimental.useVersion2": true,
"diffEditor.experimental.collapseUnchangedRegions": true,
Upvotes: 7
Reputation: 21
Such feature request is tracked here: https://github.com/microsoft/vscode/issues/3562. You can let developers know you'd like to see it implemented with a thumbs-up reaction to the first post.
Upvotes: 2