Skip to content

Add config options related to Vi input mode #375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 6, 2020
Merged

Conversation

jonathanslenders
Copy link
Member

Setting vi_start_in_nav_mode to True enables NAVIGATION mode on startup.
The issue is that due to the current behaviour of ViState.reset() input mode
gets resetted back to INSERT on the every iteration of the main loop. In order
to at one hand to provide the user with desired behaviour and on the other hand
doesn't introduce breaking changes the other option vi_keep_last_used_mode was
introduced which sets input_mode to the state observed before reset.

vi_keep_last_used_mode can be useful even with vi_start_in_nav_mode set to
False in the case the user prefer to start in INSERT mode but still wants to
maintain the last mode he was in.

In the case of vi_keep_last_used_mode set to False and
vi_start_in_nav_mode to True NAVIGATION mode is set on every iteration the
same way INSERT was set before this commit.

Fixes #258.

Commit rebased and modified by Jonathan Slenders.

antonalekseev and others added 3 commits August 6, 2020 12:01
Setting `vi_start_in_nav_mode` to `True` enables `NAVIGATION` mode on startup.
The issue is that due to the current behaviour of `ViState.reset()` input mode
gets resetted back to `INSERT` on the every iteration of the main loop. In order
to at one hand to provide the user with desired behaviour and on the other hand
doesn't introduce breaking changes the other option `vi_keep_last_used_mode` was
introduced which sets `input_mode` to the state observed before reset.

`vi_keep_last_used_mode` can be useful even with `vi_start_in_nav_mode` set to
`False` in the case the user prefer to start in `INSERT` mode but still wants to
maintain the last mode he was in.

In the case of `vi_keep_last_used_mode` set to `False` and
`vi_start_in_nav_mode` to `True` `NAVIGATION` mode is set on every iteration the
same way `INSERT` was set before this commit.

Fixes #258.

Commit rebased and modified by Jonathan Slenders.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preset for switching to Vi mode to start in normal mode
2 participants