Skip to content

Lightweight modal interface for global modes #16

@countvajhula

Description

@countvajhula

In-buffer modes like Normal, Symex, Line, Character, Word modes are currently implemented using Evil.

Global modes like Window, Buffer, View modes are currently implemented using Hydra.

Hydra doesn't provide lifecycle hooks for every stage of entry and exit from a Hydra, since it isn't exactly designed to be a modal interface (although it's a pretty good one!). This means that we cannot always detect when certain things have happened, and thus, "recalling" appropriate in-buffer modes when exiting a hydra isn't always possible, and we sometimes end up in the wrong state, or aren't able to perform other necessary exit actions (see #10 ).

There may be many ways to address this, but for now, to get a prototype working in the intended way, it would be good to write a lightweight modal interface, perhaps just a global minor mode that uses an emulation mode keymap, and see if, once it is abstracted as a Chimera modal interface provider, if we can restore the correct behavior in terms of hooks and entry/exit actions.

That would of course lose the nice menus that we get with Hydra. But once we have the lifecycle working, we would at least have a clearer idea of the hooks that are needed, and whether it would make sense to continue using Hydra or add a menu to the lightweight modal interface. It would be easy enough, with Chimera, to swap them whenever we like.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions