Skip to content

Start in vi navigation modeΒ #1631

@MatrixManAtYrService

Description

@MatrixManAtYrService

Hi. Thanks for prompt-toolkit. It's great.

I'm working on an application that populates the text area and then asks the user to delete parts of it, so the natural way to start is not in InputMode.INSERT but instead in InputMode.NAVIGATION.

I've been playing around with things like this:

    app = Application(
        key_bindings=kb, layout=Layout(root_container), editing_mode=EditingMode.VI
    )
    app.vi_state.input_mode = InputMode.NAVIGATION
    app.run()

But the app still starts in insert mode. I think that Application is calling reset() which is setting it back to insert mode.

Is there a recommended way to do this?

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