Skip to content
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

An improved way of preserving and replaying original mappings #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

homedirectory
Copy link

Certain mappings, such as scrolling in floating windows, try to be non-intrusive, and when they can't be applied they use nvim_feedkeys() to replay the original mapping.
However, this simple approach does not always work. For example, I have remapped to gt which stops working and instead scrolls by a single line even when there are no floating windows.

This change brings a more sophisticated mechanism of capturing and replaying the original mapping. The implementation was inspired by anuvyklack/keymap-amend.nvim

Certain mappings, such as scrolling in floating windows, try to be
non-intrusive, and when they can't be applied they use nvim_feedkeys()
to replay the original mapping.
However, this simple approach does not always work. For example, I have
<C-n> remapped to gt which stops working and instead scrolls by a
single line even when there are no floating windows.

This change brings a more sophisticated mechanism of capturing and
replaying the original mapping. The implementation was inspired by
anuvyklack/keymap-amend.nvim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant