-
Notifications
You must be signed in to change notification settings - Fork 89
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
Allow us to disable the default keymappings easily #248
base: master
Are you sure you want to change the base?
Conversation
This makes no sense. And plugins that have this kind of option are broken. Sneak will not map
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 |
You seems to have overlooked some users
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:
However it's definitely obscure. Sneak has a bunch of weird options already so I guess I will cave here. |
@@ -259,6 +259,13 @@ OPTIONS *sneak-options* | |||
To change an option, add a |let| statement in your |vimrc|. Example: > | |||
let g:sneak#use_ic_scs = 0 | |||
< | |||
g:sneak#no_default_mappings = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flip it so it is "positive logic"
g:sneak#no_default_mappings = 0 | |
g:sneak#default_mappings = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer the negative one here because it sounds natural for me (at least) to be set to 0 as default, and user will set it to 1 to turn on especially when an option expects either 0 or 1 as "OFF" or "ON".
Addition to that, I usually unify default values to be set to 0 unless the variable has specific reason to be other than 0; such unification reduces unnecessary chances that users should grep default values.
However, I also know positive logic is preferable in most cases so that it's a matter of taste after all. Please adopt the one on your preference.
Before the PR, the default keymappings sometimes annoyed us, who would like to use
s
as vim's default (the synonym forcl
) and so on.