nvlime icon indicating copy to clipboard operation
nvlime copied to clipboard

An improved way of preserving and replaying original mappings

Open homedirectory opened this issue 1 year ago • 0 comments

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

homedirectory avatar Mar 09 '24 19:03 homedirectory