GitSavvy
GitSavvy copied to clipboard
Inline diff: Fold code outside hunks
I'm loving GitSavvy inline diff for most things, but one feature in particular keeps sending me back to SourceTree: the ability to see all changes quickly with minimal space dedicated to the intervening unchanged code. To that end, could we make it possible to fold code outside of the hunks?
I'd ask for a quick way to change the hunk size. – perhaps the number keys could serve this purpose (1
= 1 line of context, 2
= 3 lines of context, 3
= 6 lines of context, 0
= no folding).
One way we could go about this with minimal impact to our codebase is to use the actual code folding feature itself. That should be a relatively simple change, and making context configurable wouldn't be any harder, I think. We can definitely give it a try!
Should we add these command for the normal diff so you can control the contex code?
That would be useful too – and more consistent. The only difference, I think, would be that the normal diff would have no analogue for the "no folding" command.
Adding an element to my original suggestion: originally, I thought of varying the hunk size only as a way to control the folding behavior. This may have been obvious to others, but I just realized that varying the hunk size should also control what happens when you press h
to stage a hunk.