INNER CODE UNIT · Rust

test_vim_preset

bgreenwell/doxx · src/keymap/mod.rs:73

    fn test_vim_preset() {
        let km = Keymap::from_preset(KeymapPreset::Vim);
        assert_eq!(
            km.get_action(&KeyBinding::char('/')),
            Some(Action::EnterSearch)
        );
        assert_eq!(
            km.get_action(&KeyBinding::ctrl('d')),
            Some(Action::HalfPageDown)
        );
        assert_eq!(
            km.get_action(&KeyBinding::ctrl('u')),
            Some(Action::HalfPageUp)
        );
        assert_eq!(
            km.get_action(&KeyBinding::char('N')),
            Some(Action::SearchPrevious)
        );

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…