Skip to content

Option to view diff with entire file as context #2034

Open
@nikclayton

Description

@nikclayton

Problem description

The current diff view options are either inline or side-by-side.

In both cases, only the diff hunks and a few lines of context are shown.

Sometimes you need a lot more context.

Preferred solution

An option to show the entire file (essentially, infinite context), with the diff regions highlight as they currently are.

Screenshots

I'm coming from https://git-fork.com/, which can do this, see this screenshot (this is also relevant for #2033).

Image

Activity

themilkman

themilkman commented on Apr 28, 2025

@themilkman

https://www.sublimemerge.com/ - see the second animation, you may increase the hunk size.
Also, when hovering the section below the file name, an icon occurs that allows you to show the entire file.
Is that what you were looking for?

nikclayton

nikclayton commented on Apr 28, 2025

@nikclayton
Author

It seems to be possible to drag the dividers to -- on a per-file basis -- change the hunk size for a particular diff, but that is inadequate for a number of reasons.

  1. It is not persisted. By which I mean, click on a commit to view the diff, and drag the hunk dividers to see more context. Then click on a different commit. Then click back on the original commit. The hunk dividers have moved back to their original position.
  2. The click/drag target for the dividers is quite small, making this a frustrating experience on a large / high DPI monitor with a small font.
  3. And most importantly, I have to do this on every single diff. I would like a preference setting that lets me set my preferred context, including an option to specify "Show entire file".
dpjohnst

dpjohnst commented on May 1, 2025

@dpjohnst
Member

G'day @nikclayton,

Thanks for sharing this detailed feedback - really appreciate it!
I'll be looking into ways to address this.

Cheers,
- Dylan from Sublime HQ

dpjohnst

dpjohnst commented on May 6, 2025

@dpjohnst
Member

Hi @nikclayton,

I just wanted to follow up in case you've missed this. There is also a "show entire file" button on the diff that can be clicked to quickly reveal the entire file. This button is visible when hovering over the diff:

Image

Kind regards,
- Dylan from Sublime HQ

nikclayton

nikclayton commented on May 9, 2025

@nikclayton
Author

Yes -- I'd like a preference that makes that the default behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nikclayton@themilkman@dpjohnst

        Issue actions

          Option to view diff with entire file as context · Issue #2034 · sublimehq/sublime_merge