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

better-escape is too eager to delete mappings #89

Closed
gsinclair opened this issue Jul 20, 2024 · 1 comment · Fixed by #87
Closed

better-escape is too eager to delete mappings #89

gsinclair opened this issue Jul 20, 2024 · 1 comment · Fixed by #87

Comments

@gsinclair
Copy link

gsinclair commented Jul 20, 2024

I have a visual-mode mapping for j that is independent of better-escape. I then call better-escape's setup with options default_mappings = false and I only set up an insert-mode mapping. But the effect of loading better-escape is that my visual-mode mapping for j is deleted.

Looking at the code, I see that unmap_keys acts on every mapping in the default mappings. It is not sensitive to what the user has provided.

Version of plugin used: latest as at 20 July 2023.

Configuration:

  {
    "max397574/better-escape.nvim",
    config = function()
      require('better_escape').setup {
        default_mappings = false,
        mappings = {
          i = {
            j = {
              k = '<Esc>'
            }
          }
        }
      }
    end
  },

@max397574
Copy link
Owner

should be fixed now

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 a pull request may close this issue.

2 participants