-
Notifications
You must be signed in to change notification settings - Fork 620
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
Allow VimwikiToggleListItem mapping to be replaced #1047
Merged
Merged
Conversation
This file contains 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
Currently VimwikiToggleListItem mapping cannot be removed but only new mapping to it can be added. This commit will allow to add custom binding to this function and release default mapping of <C-space> and <C-@>, which was how it was before vimwiki#686
6 tasks
I don't know why it was forced. |
6 tasks
tinmarino
pushed a commit
that referenced
this pull request
Jan 15, 2021
A changed aimed to allow user configuration files to be able to override all default mappings for the VimwikiToggleListItem plug did so by removing the optional forth argument to vimwiki#u#map_key(). This argument if set to 1 allows the same plug to be mapped to multiple keys in the same mode. If not present only the first mapping takes effect and all later attempts to map the plug in the same mode result in a no-op. Thus allowing any user configuration to set it first and then 'skipping' the defaults. The change however did not account for that the default on Unix systems was to map both <C-Space> _and_ <C-@> to VimwikiToggleListItem so the change breaks this behavior, described in issue #1061. Fix this by restoring the forth argument to vimwiki#u#map_key() to allow multiple mappings to the same plug/mode but wrap it in a block to first check if the user have overridden it or not. This goes back to how his was handled before vimwiki#u#map_key() was added in [1]. 1. 4106cb7 ("New option g:vimwiki_key_mappings to enable/disable key mappings.") Fixes: 48baa1f ("Allow VimwikiToggleListItem mapping to be replaced (#1047)") Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
deepredsky
pushed a commit
to deepredsky/vimwiki
that referenced
this pull request
Jan 16, 2021
jls83
pushed a commit
to jls83/vimwiki
that referenced
this pull request
Jan 17, 2023
* Allow VimwikiToggleListItem mapping to be replaced Currently VimwikiToggleListItem mapping cannot be removed but only new mapping to it can be added. This commit will allow to add custom binding to this function and release default mapping of <C-space> and <C-@>, which was how it was before vimwiki#686 * Update changelog + contributor list * endi -> endif Co-authored-by: Tinmarino <tinmarino@gmail.com>
jls83
pushed a commit
to jls83/vimwiki
that referenced
this pull request
Jan 17, 2023
A changed aimed to allow user configuration files to be able to override all default mappings for the VimwikiToggleListItem plug did so by removing the optional forth argument to vimwiki#u#map_key(). This argument if set to 1 allows the same plug to be mapped to multiple keys in the same mode. If not present only the first mapping takes effect and all later attempts to map the plug in the same mode result in a no-op. Thus allowing any user configuration to set it first and then 'skipping' the defaults. The change however did not account for that the default on Unix systems was to map both <C-Space> _and_ <C-@> to VimwikiToggleListItem so the change breaks this behavior, described in issue vimwiki#1061. Fix this by restoring the forth argument to vimwiki#u#map_key() to allow multiple mappings to the same plug/mode but wrap it in a block to first check if the user have overridden it or not. This goes back to how his was handled before vimwiki#u#map_key() was added in [1]. 1. 4106cb7 ("New option g:vimwiki_key_mappings to enable/disable key mappings.") Fixes: 48baa1f ("Allow VimwikiToggleListItem mapping to be replaced (vimwiki#1047)") Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
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.
Currently VimwikiToggleListItem mapping cannot be removed but only new mapping
to it can be added. This commit will allow to add custom binding to this
function and release default mapping of
<C-space>
and<C-@>
, which was how itwas before #686
Steps for submitting a pull request:
dev
branch!doc/vimwiki.txt
if applicable,including the Changelog and Contributors sections.