-
Notifications
You must be signed in to change notification settings - Fork 13
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
Do not set the default mapping for normal mode #15
Comments
The plugin checks whether there is already a mapping to the function it wants to map. The way to work around this is to assign a mapping to the two footnote related commands. The plugin will then not touch the default nmap <Leader>^ <Plug>AddVimFootnote Adding a custom binding like this will suppress the default one. |
The issue is that I do not really need the two normal mode mappings since I usually insert footnote in insert mode instead of normal mode. |
As a work around setup a normal mode binding anyway to some throw away key you don't use. I'll leave this issue open until we figure out a way to suppress the bindings altogether. |
This was fixed as of 7eb62d2, mappings are no longer added if the user has an existing mapping on the default key. Note the warned-of repository rebase also just happened, so in order to update your plugin you might need to either remove and re-install it or manually |
A minor issue. In normal mode, The logic should be: if |
@jdhao That would not cover the case of the user having setup a custom map for the first but wanting to use the default binding for the second. It already handles the case of not adding an extra mapping if the user has a custom one. If you start trying to cover all possible cases then things get really complex and I'm not sure it's worth the confusion. This is why some plugins just brute force this and either force all their default mappings (even if they clobber others) or had a flag to set no bindings at all (leaving the user to map everything). I think the present config makes some sense and I'm not really worried about the extra return binding getting set in the event of a clobber + no custom bindings. That can be left as an exercise for the user. Besides we're talking about overhauling bindings anyway, see #17. |
I have used
,f
for other mapping in normal mode. This plugin should check if the mapping key has been used before setting the default mappings for normal mode.The text was updated successfully, but these errors were encountered: