sublime_merge icon indicating copy to clipboard operation
sublime_merge copied to clipboard

Automatically collapse file diffs matching a pattern

Open icholy opened this issue 3 years ago • 1 comments

Problem description

The contents of auto generated files create a lot of noise in the diff view. For example:

  • Node.js package-lock.json files.
  • Go go.sum
  • Protocol buffers generated code.

Preferred solution

Allow configuring a set of file patterns which are collapsed by default.

Example:

{
  "diff_collapse_files": [
    "package-lock.json",
    "go.sum",
    "*.pb.go"
  ]
}

Alternative Solution

A command/shortcut for toggling the collapsed state of all files in the diff view.

icholy avatar Aug 26 '22 14:08 icholy

Being able to automatically collapse by filename would be fabulous. I have a repo full of geojson files, with the bigger commits weighing in at 15k lines, each of which is wrapped to 10+ screen lines. There is a noticeable lag when navigating through commits in this repo, while Sublime constructs the UI which I almost never want to see.

nk9 avatar Mar 10 '24 22:03 nk9