# vim: Multiline operation improvements \(\#24518\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 69d415c8d01769dd89d3136d4427cbf068eda645

Requested commit: 69d415c8d01769dd89d3136d4427cbf068eda645

Commit: 69d415c8d01769dd89d3136d4427cbf068eda645

Tree: f5984139d92d973c7e64ddd7d61f5377ebbbf5a5

Author: 5brian

Committer: GitHub

## Message

```
vim: Multiline operation improvements (#24518)

Closes #15711

Discussed changes to match neovim in
https://github.com/zed-industries/zed/pull/24481#issuecomment-2644504695
-- `vi{` matches neovim with treesitter instead of vanilla neovim.
Change and delete matches standard neovim.

Not sure if this is the best way to do it, implemented post processing
to change and delete objects.
I think another way would be adjust the range to trim the trailing
newline char on change and delete operations, instead of having to add
it back.

||Before|After|
|---|---|---|

|initial|![image](https://github.com/user-attachments/assets/0bab37b7-c0ac-4992-a365-b7ec304a6800)||
| `vi{` |
![image](https://github.com/user-attachments/assets/4c802fcd-fa7e-45ba-b7d4-3283ed538e10)
|
![image](https://github.com/user-attachments/assets/4394bb6e-418b-4463-9737-f9bdfc6d31c2)
|
| `ci{` |
![image](https://github.com/user-attachments/assets/b5eabb58-4a93-4c98-80b6-f34a6525b1fb)
|
![image](https://github.com/user-attachments/assets/79af57e4-260c-4432-af66-eba5285d97a0)
|
| `di{` |
![image](https://github.com/user-attachments/assets/190a70e7-71fd-47fe-9d6c-2082f2034d0f)
|
![image](https://github.com/user-attachments/assets/775b86a9-68c1-4397-a44b-c645a772de63)
|

Release Notes:

- vim: Improved multi-line operations
```

## Parents

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

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