This repository has been archived by the owner on Apr 6, 2018. It is now read-only.
Document a tip for improved Insert Mode mappings for ESC #946
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.
As discussed at length in issue #334, mapping double characters to ESC
is a common Vim pattern (e.g, 'jj' or 'jk'). Atom supports this style of
mapping, but the editor behavior is inconsistent with Vim in that the
initial characters that partially match a mapping are not displayed on
screen. This is jarring to the user.
This PR adds documentation to the README that describes a two-step
approach to mapping ESC that removes the delay from the editor and much
more closely imitates Vim's behavior.
This issue exists today in Atom 1.3.2. A future update to Atom may
change the behavior of
KeymapManager so that
partial matches are displayed. Work in this area was most recently done in
PR #94 on atom-keymap.
It's unlikely that changing this behavior is a high priority, so I suspect this
technique will be valuable for a long time to come.
I considered adding this info to a Wiki, but since this project doesn't
currently have one I figured the README was the next-best place.
Remapping ESC is sufficiently common among Vim users that the info
should be right up front.