zed/assets/keymaps
Benjamin Westphal 1fae99a7c4
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
vim: Add motion support for toggle comments (#14919)
### Summary

This PR adds support for count and object motions to the toggle comments
action in Vim mode. The relevant issue is
[#14337](https://github.com/zed-industries/zed/issues/14337).

For example, `2 g c j` will toggle comments three lines downward. `g c g
g` will toggle comments from the current cursor position up to the start
of the file.

Notably missing from this PR are `g c b` (toggle comments for the
current block) as well as `g c p` (toggle comments for the current
paragraph). These seem to be non-standard.

The new module `normal/toggle_comments.rs` has been copied almost
verbatim from `normal/indent.rs`. Maybe that ought to be abstracted over
but I feel I lack the overview.

Release Notes:

- vim: Added support for count and object motion to the toggle comments
action ([#14337](https://github.com/zed-industries/zed/issues/14337)).
2024-07-22 21:22:10 -06:00
..
linux Fix default sublime tab navigation (#14427) 2024-07-17 10:07:46 -04:00
macos Fix default sublime tab navigation (#14427) 2024-07-17 10:07:46 -04:00
default-linux.json Expand terminal menu actions (#14828) 2024-07-20 12:20:53 +03:00
default-macos.json Expand terminal menu actions (#14828) 2024-07-20 12:20:53 +03:00
initial.json Show an initial empty keymap (#14609) 2024-07-16 20:24:13 -06:00
storybook.json storybook: Fix Backspace in Auto Height Editor and Picker stories (#11011) 2024-04-25 17:37:47 -04:00
vim.json vim: Add motion support for toggle comments (#14919) 2024-07-22 21:22:10 -06:00