mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-01 04:28:57 +00:00
f0aeab7d00
Closes #19417 Release Notes: - vim : Added `r` and `a` as aliases for `[` and `<` text objects (copying vim-surround). - vim: (breaking change) rebound the function argument text object to `g`. - vim: Fixed surrounds to allow `b`/`B`/`r`/`a` anywhere you could use `(`, `{`, `[`, `<`. --- - vim: Added `b`, `B`, `r`, `s`, `a` as aliases for `()`, `{}`, `[]`, `<>` in vim surround mode. - Adds a new `surround_alias` function where aliases are defined. - This function is used in `find_surround_pairs` to substitute the chosen text with the alias - The keymap is also modified to add support for Square and Angle brackets when changing surrounds. These two were added to follow the example of Tim Pope's ubiquitous `vim-surround` plugin. - I had to overwrite the `vim::Argument` keybind in order to do this. I moved it to use the `g` modifier. I realize this is a breaking change and will happily move the `vim::AngleBracket` keymap to a different letter if you'd like to avoid this. I'm just trying to keep with convention. Ideally, Users would be able to define surround aliases themselves in the config file but that's a much bigger task than I'm able to do right now. - I also added tests for the new aliases. Thanks for making such a clean and organized codebase. I was able to find the relevant section of code rather quickly thanks to this. |
||
---|---|---|
.. | ||
fonts | ||
icons | ||
images | ||
keymaps | ||
prompts | ||
settings | ||
sounds | ||
themes |