ZIm/crates/vim/src
5brian 69d415c8d0
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
2025-02-10 08:45:06 -07:00
..
digraph Add Vim digraphs (#14887) 2024-07-28 22:44:32 -06:00
normal Migrate keymap and settings + edit predictions rename (#23834) 2025-02-07 21:17:07 +05:30
test Rename model based variable names to entity (#24198) 2025-02-04 10:24:35 -08:00
change_list.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
command.rs pane: Improve close active item to better handle pinned tabs (#23488) 2025-02-07 22:54:57 +05:30
digraph.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
helix.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
indent.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
insert.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
mode_indicator.rs Remove more references to 'model' in GPUI APIs (#23693) 2025-01-27 04:00:27 +00:00
motion.rs Migrate keymap and settings + edit predictions rename (#23834) 2025-02-07 21:17:07 +05:30
normal.rs vim: Replace with Register (#24326) 2025-02-06 20:24:41 -07:00
object.rs vim: Multiline operation improvements (#24518) 2025-02-10 08:45:06 -07:00
replace.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
rewrap.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
state.rs Migrate keymap and settings + edit predictions rename (#23834) 2025-02-07 21:17:07 +05:30
surrounds.rs Migrate keymap and settings + edit predictions rename (#23834) 2025-02-07 21:17:07 +05:30
test.rs Migrate keymap and settings + edit predictions rename (#23834) 2025-02-07 21:17:07 +05:30
vim.rs Migrate keymap and settings + edit predictions rename (#23834) 2025-02-07 21:17:07 +05:30
visual.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00