# workspace: Move panes to span the entire border in Vim mode \(\#39123\) · gitcafe/zed

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

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

Visibility: public

Requested revision: aec3c2fbb71254113da801f2fec952bb426f7ce1

Requested commit: aec3c2fbb71254113da801f2fec952bb426f7ce1

Commit: aec3c2fbb71254113da801f2fec952bb426f7ce1

Tree: 1ae737d533b99d8502dda5b2841f77cbbdcc9f93

Author: Ivan Trubach

Committer: GitHub

## Message

```
workspace: Move panes to span the entire border in Vim mode (#39123)

Currently, <kbd>⌃w</kbd> + <kbd>HJKL</kbd> keystrokes swap active pane
with another pane in that direction. Also, if there is no pane to swap
with, nothing happens.

This does not match the expected Vim behavior: moving the split to span
the entire border.

See
https://github.com/vim/vim/blob/ca6a260ef1a4b4ae94bc71c17cbabf8f12bf0f8c/runtime/doc/windows.txt#L527-L549

This change adds `MovePane{Up,Down,Left,Right}` actions that do exactly
that and updates default Vim keymap.

<table>
<tr>
  <th>Before</th>
  <th>After</th>
<tr>
<td><video
src="https://github.com/user-attachments/assets/5d3a25bf-e8b6-46c1-9fbb-004f0194e0dd">
<td><video
src="https://github.com/user-attachments/assets/5276f115-5063-411e-b141-5d268a79581b">
<tr>
  <th>Vim</th>
<tr>
<td><video
src="https://github.com/user-attachments/assets/df9fbf83-d0de-42c0-8fb0-b134be833bde">
</table>

Release Notes:

- Changed `ctrl+w` + `shift-[hjkl]` in Vim mode to move the split to
span the entire border, aligning with Vim‘s behavior.

Signed-off-by: Ivan Trubach <mr.trubach@icloud.com>
```

## Parents

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

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