-
Notifications
You must be signed in to change notification settings - Fork 282
fix(input/#595): Handle simple vim remaps #2668
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 tasks
bryphe
added a commit
that referenced
this pull request
Nov 7, 2020
This adds support for specifying the `<leader>` key in `keybindings.json` as well as mappings coming from VimL (`map` family). The leader key can be specified via either: - `vim.leader` configuration setting in `configuration.json` - ie: `"vim.leader": "<space>"` - `:map <space> <leader>`"` via an Ex command. In addition, this also lays some groundwork for some other binding constructs we need... Like support for handling `<Plug>` and `<SNR>` as part of the VimL integration work. __TODO:__ - [x] Depends on #2668 - [x] Add `vim.leader` configuration setting - [x] Update documentation __Next steps:__ - Pull leader key from `let mapleader`, if available - this requires a bit of extra work in libvim: onivim/libvim#244
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This implements the first step in handling Vim remaps (
map
,inoremap
, etc) - hooks up the externalized mapping API in onivim/libvim#236 , and uses a common input handling framework for both the bindings specified inkeybindings.json
and the mappings specified viamap
- an important step in being able to use and load VimL plugins and configuration.This only handles very basic mappings currently - mappings that don't have any mode transitions and are only command characters (
<esc>
,<cr>
, etc) - however, subsequent work will remove these limitations. It's enough though to handle basic scenarios like #595 , but not enough to handle more intricate bindings as described in #2579 (yet).Fixes #595