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

the option g:sandwich_no_default_key_mappings does not work as expected #104

Open
jdhao opened this issue Oct 11, 2020 · 1 comment
Open

Comments

@jdhao
Copy link

jdhao commented Oct 11, 2020

The documentation says that the option g:sandwich_no_default_key_mappings will disable the mappings defined by vim-sandwich. But even with this option on, vim-sandwich still provides sa, sd and sr mappings.

My minimal nvim config to reproduce:

set runtimepath+=/Users/jdhao/.local/share/nvim/plugged/vim-sandwich
let g:sandwich_no_default_key_mappings = 1

Then open nvim with nvim -u init.vim and use the command :filter sandwich map to show vim-sandwich related mappings. sa, sd and sr mappings are still there.

image

Is this the intended behavior or a bug?

@machakann
Copy link
Owner

This is, sadly, intended but, indeed, not intuitive. So far please add another line,

let g:sandwich_no_default_key_mappings = 1
let g:operator_sandwich_no_default_key_mappings = 1

And if you want to disable textobjects, you need the additional line also.

let g:textobj_sandwich_no_default_key_mappings = 1

This confusion comes from the internal implementation, however, of course none of user's business. I may change and make it easier for future.

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

No branches or pull requests

2 participants