# Allow to toggle git hunk diffs \(\#11080\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/caa0d35b8beba7944e1ff3e7e6c7b65072ad47f8)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: caa0d35b8beba7944e1ff3e7e6c7b65072ad47f8

Requested commit: caa0d35b8beba7944e1ff3e7e6c7b65072ad47f8

Commit: caa0d35b8beba7944e1ff3e7e6c7b65072ad47f8

Tree: c64f48a9df1ff0ede9c4dd7cb86dc37ff1c923ac

Author: Kirill Bulatov

Committer: GitHub

## Message

````
Allow to toggle git hunk diffs (#11080)

Part of https://github.com/zed-industries/zed/issues/4523

Added two new actions with the default keybindings

```
"cmd-'": "editor::ToggleHunkDiff",
"cmd-\"": "editor::ExpandAllHunkDiffs",
```

that allow to browse git hunk diffs in Zed:


https://github.com/zed-industries/zed/assets/2690773/9a8a7d10-ed06-4960-b4ee-fe28fc5c4768


The hunks are dynamic and alter on user folds and modifications, or
toggle hidden, if the modifications were not adjacent to the expanded
hunk.


Release Notes:

- Added `editor::ToggleHunkDiff` (`cmd-'`) and
`editor::ExpandAllHunkDiffs` (`cmd-"`) actions to browse git hunk diffs
in Zed
````

## Parents

- [5831d80f513fe374673dabe1346588ea5ad8cba1](https://git.cafe/gitcafe/zed/commit/5831d80f513fe374673dabe1346588ea5ad8cba1?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/caa0d35b8beba7944e1ff3e7e6c7b65072ad47f8?format=markdown)
