Skip to content

Add PreModeChanged autocmd for cancelling mode transitions #315

Description

@RobertCraigie

In some cases you may want to disable specific mode transitions that glide does by default, e.g.

void glide.excmds.execute("mode_change insert");
.

I think an elegant way to support this, would be to introduce a new autocmd that fires before the mode actually changes, and can be used to prevent a mode change from happening.

We should update all mode changes to also include a "source", so you can tell what actually triggered a mode change.

I'm not sure what exactly this API should look like, and all the edge cases therein yet.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions