1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Vim-style lookup policy.
//!
//! This module defines `VimLookupPolicy`, the Vim-specific policy for
//! interpreting key lookup results. It prefers waiting for longer sequences
//! (e.g., waits for `dd` after `d` is pressed).
//!
//! # Architecture
//!
//! This is POLICY code - it lives in the vim module because it defines
//! Vim-specific behavior. The mechanism types (`KeyLookupPolicy`,
//! `KeyLookupState`, `KeyLookupResult`) live in `driver-input`.
use ;
/// Vim-style lookup policy: prefer longer sequences.
///
/// When an exact match exists AND longer bindings exist (e.g., `d` when `dd`
/// also exists), this policy returns `Prefix` to wait for more keys.
///
/// This is the standard Vim behavior where typing `d` doesn't immediately
/// execute anything - it waits to see if `dd`, `dw`, `d$`, etc. follow.
;