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_mode
toTrue
enablesNAVIGATION
mode on startup.The issue is that due to the current behaviour of
ViState.reset()
input modegets resetted back to
INSERT
on 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_mode
wasintroduced which sets
input_mode
to the state observed before reset.vi_keep_last_used_mode
can be useful even withvi_start_in_nav_mode
set toFalse
in the case the user prefer to start inINSERT
mode but still wants tomaintain the last mode he was in.
In the case of
vi_keep_last_used_mode
set toFalse
andvi_start_in_nav_mode
toTrue
NAVIGATION
mode is set on every iteration thesame way
INSERT
was set before this commit.Fixes #258.
Commit rebased and modified by Jonathan Slenders.