Add config options related to Vi input mode #375
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Setting
vi_start_in_nav_modetoTrueenablesNAVIGATIONmode on startup.The issue is that due to the current behaviour of
ViState.reset()input modegets resetted back to
INSERTon the every iteration of the main loop. In orderto 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_modewasintroduced which sets
input_modeto the state observed before reset.vi_keep_last_used_modecan be useful even withvi_start_in_nav_modeset toFalsein the case the user prefer to start inINSERTmode but still wants tomaintain the last mode he was in.
In the case of
vi_keep_last_used_modeset toFalseandvi_start_in_nav_modetoTrueNAVIGATIONmode is set on every iteration thesame way
INSERTwas set before this commit.Fixes #258.
Commit rebased and modified by Jonathan Slenders.