# Add centered layout support \(\#9754\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 4eb1e65fbb6d4be03f214f180db72ab5f9af810e

Requested commit: 4eb1e65fbb6d4be03f214f180db72ab5f9af810e

Commit: 4eb1e65fbb6d4be03f214f180db72ab5f9af810e

Tree: e2f0a916733622989de0890f3e6bb7fcc7f4e36e

Author: Andrew Lygin

Committer: GitHub

## Message

````
Add centered layout support (#9754)

This PR implements the Centered Layout feature (#4685):
- Added the `toggle centered layout` action.
- The centered layout mode only takes effect when there's a single
central pane.
- The state of the centered layout toggle is saved / restored between
Zed restarts.
- The paddings are controlled by the `centered_layout` setting:

```json
"centered_layout": {
  "left_padding": 0.2,
  "right_padding": 0.2
}
```

This allows us to support both the VSCode-style (equal paddings) and
IntelliJ-style (only left padding in Zen mode).

Release Notes:

- Added support for Centered Layout
([#4685](https://github.com/zed-industries/zed/pull/9754)).


https://github.com/zed-industries/zed/assets/2101250/2d5b2a16-c248-48b5-9e8c-6f1219619398

Related Issues:

- Part of #4382
````

## Parents

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

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