ZIm/crates/vim/src
Ben Kunkle deb2564b31
gpui: Add keybind metadata API (#33316)
Closes #ISSUE

Adds a very simple API to track metadata about keybindings in GPUI,
namely the source of the binding. The motivation for this is displaying
the source of keybindings in the [keymap
UI](https://github.com/zed-industries/zed/pull/32436).

The API is designed to be as simple and flexible as possible, storing
only a `Option<u32>` on the bindings themselves to keep the struct
small. It is intended to be used as an index or key into a table/map
created and managed by the consumer of the API to map from indices to
arbitrary meta-data. I.e. the consumer is responsible for both
generating these indices and giving them meaning.

The current usage in Zed is stateless, just a mapping between constants
and User, Default, Base, and Vim keymap sources, however, this can be
extended in the future to also track _which_ base keymap is being used.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-06-24 16:07:45 +00:00
..
digraph Add Vim digraphs (#14887) 2024-07-28 22:44:32 -06:00
normal gpui: Simplify Action macros + support doc comments in actions! (#33263) 2025-06-24 04:34:51 +00:00
test gpui: Add keybind metadata API (#33316) 2025-06-24 16:07:45 +00:00
change_list.rs Add a way to navigate between changes (#28891) 2025-04-16 14:09:17 -06:00
command.rs gpui: Simplify Action macros + support doc comments in actions! (#33263) 2025-06-24 04:34:51 +00:00
digraph.rs gpui: Simplify Action macros + support doc comments in actions! (#33263) 2025-06-24 04:34:51 +00:00
helix.rs Add Helix implementation for Motion::FindForward and Motion::FindBackward (#31547) 2025-06-02 22:15:21 -06:00
indent.rs vim: Add some forced motion support (#27991) 2025-04-11 11:12:30 -06:00
insert.rs vim: Fix escape key switching back to default mode instead of normal mode (#31843) 2025-06-18 21:26:12 +00:00
mode_indicator.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
motion.rs gpui: Simplify Action macros + support doc comments in actions! (#33263) 2025-06-24 04:34:51 +00:00
normal.rs vim: Fix add empty line (#30987) 2025-06-02 09:49:31 -06:00
object.rs gpui: Simplify Action macros + support doc comments in actions! (#33263) 2025-06-24 04:34:51 +00:00
replace.rs debugger: Parse and highlight text with ANSI escape sequences (#32915) 2025-06-17 23:39:31 -04:00
rewrap.rs vim: Add some forced motion support (#27991) 2025-04-11 11:12:30 -06:00
state.rs Add :delm[arks] {marks} command to delete vim marks (#31140) 2025-06-02 13:18:28 -06:00
surrounds.rs vim: Add some forced motion support (#27991) 2025-04-11 11:12:30 -06:00
test.rs Revert "debugger: Process ANSI color escape codes in console" (#32906) 2025-06-17 22:13:12 +00:00
vim.rs gpui: Simplify Action macros + support doc comments in actions! (#33263) 2025-06-24 04:34:51 +00:00
visual.rs Fix panic in vim selection restoration (#29251) 2025-04-22 22:28:13 -06:00