Skip to content

Include local minor mode for mode-specific but not editing-specific symex keybindings #164

@yuki-tsubaki

Description

@yuki-tsubaki

Before 2.0 I had set up keybindings for Evil mode that manage entering the Symex editing state.

Among other things, I bound <escape> in the insert state of symex-mode-map to symex-mode-interface thus effectively swapping normal state and Symex as my default editing state.

In 2.0 symex-mode is a global minor mode. While this is probably important for some things, it breaks this workflow as there isn't really much of a concept of Symex being enabled in a specific buffer, but rather being enabled in all buffers with the specific Symex functionality always available if one calls synmex-mode-interface.

I don't know if this is the best way to solve it, but my first thought after I noticed I can't use symex-mode anymore was to define a new minor mode (maybe symex-available-mode) with a keymap and then use that.

The idea would be to hook symex-available-mode into modes where having the Symex editing state available makes sense. This would seem to fix my usecase without interfering too much with the new architecture.

On the other hand, if symex-mode (and the like) don't need to be global minor modes, it would be more clean to just use them (which for my use, only requires defining the symex-mode-map variable before defining the minor mode).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions