vim-sneak
vim-sneak copied to clipboard
Allow us to disable the default keymappings easily
Before the PR, the default keymappings sometimes annoyed us, who would like to use s
as vim's default (the synonym for cl
) and so on.
This makes no sense. And plugins that have this kind of option are broken.
Sneak will not map s
if the user has mapped <Plug>Sneak_s/S
to anything else:
nmap ? <Plug>Sneak_s
nmap ? <Plug>Sneak_S
If that's too much work, then why have Sneak installed in the first place? Its entire purpose is to provide a mapping. If you don't like the default mapping then you need to choose a different mapping (as shown above). So a "disable mappings" option makes no sense.
Added documentation :help sneak-disable-mappings
in 08414770f4bd
You seems to have overlooked some users
- who want to map only with sneak#wrap() flexibly, but without
<Plug>Sneak_foo
- who want to use Sneak only buffer-locally, like readonly-buffer or in specific filetype/buftype
- who only want to use
<Plug>Sneak_f/t
or<Plug>SneakLabel_s
and so on, but without<Plug>Sneak_s
I may also overlook other problems which the feature solve.
Isn't it an easiest, certain way for Sneak users to understand in the analogy of other vim-plugins which have g:foo#no_default_mappings? Or do you have any other reasons to cling to the current, smartest way?
Thanks, that is a good list of use cases. In those cases user is going to a lot of trouble already, so this is not much more trouble:
map <f99> <Plug>Sneak_s<Plug>Sneak_S
map! <f99> <Plug>Sneak_s<Plug>Sneak_S
However it's definitely obscure. Sneak has a bunch of weird options already so I guess I will cave here.