zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
45.73k stars 2.52k forks source link

Vim mode support ToggleBool #10400

Open d1y opened 4 months ago

d1y commented 4 months ago

Check for existing issues

Describe the feature

Already have it now vim::Increment && vim::Decrement, But I hope to support toggle boolean value(s) 👀

Here's a good demo from https://github.com/polirritmico/simple-boolean-toggle.nvim

https://github.com/polirritmico/simple-boolean-toggle.nvim/assets/24460484/04bed6c8-c146-4a20-907c-d1ce48524b75

If applicable, add mockups / screenshots to help present your vision of the feature

No response

0x2CA commented 4 months ago

It seems that g <C-a> and g <C-x> is not supported now, can it be optimized too?

d1y commented 4 months ago

It seems that g <C-a> and g <C-x> is not supported now, can it be optimized too?

I also agree in vim::Increment && vim::Decrement To implement the toggleBool There is no need to bind new key :) But there may be semantic ambiguities🤔.