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

Change default bindings to use C-n/C-p #1098

Merged
merged 5 commits into from
May 6, 2021
Merged

Conversation

dgutov
Copy link
Member

@dgutov dgutov commented Apr 24, 2021

This seems to be a more popular scheme, among starter kits as well as end users
(if one judges by configuration snippets posted in various forums).

Should also work around WM misbehavior like described in
https://stackoverflow.com/questions/51585036/check-bindings-in-company-active-map?noredirect=1&lq=1
and
#1086 (comment).

And here's a recent Reddit poll: https://www.reddit.com/r/emacs/comments/my6rzb/companymode_to_change_default_bindings_from_mnmp/

This seems to be a more popular scheme, among starter kits as well as end users
(if one judges by configuration snippets posted in various forums).

Should also work around WM misbehavior like described in
https://stackoverflow.com/questions/51585036/check-bindings-in-company-active-map?noredirect=1&lq=1
and
#1086 (comment).
@dgutov dgutov changed the title Change default bindings to use M-n/M-p Change default bindings to use C-n/C-p Apr 25, 2021
@yugaego
Copy link
Member

yugaego commented May 3, 2021

Have it also been considered to enable cycling by default? (I didn't find such an issue.)
F.i., as a fresh company user I expected to have this feature and then stumbled upon the example in Wiki.

@dgutov
Copy link
Member Author

dgutov commented May 3, 2021

Have it also been considered to enable cycling by default? (I didn't find such an issue.)

Not thus far, no. I feel it's an advanced feature, sort of, if we want to keep the "expand common" feature on TAB as well.

Happy to be proved wrong, though.

F.i., as a fresh company user I expected to have this feature and then stumbled upon the example in Wiki.

What formed this expectation? Some other editors you used previously?

@dgutov
Copy link
Member Author

dgutov commented May 3, 2021

Thanks for the wiki link either way (it will need to be updated).

@yugaego
Copy link
Member

yugaego commented May 4, 2021

What formed this expectation? Some other editors you used previously?

Sure, just a subjective feel. The point was I was wondering if the feel was shared by the other users. (Similar to how the majority seemed to be up to change M-n/p defaults to C-n/p.) If it's not, then we may simply abandon this question.

Thanks for the wiki link either way (it will need to be updated).

👍

@dgutov dgutov merged commit 2cca48a into master May 6, 2021
@dgutov dgutov deleted the default-bindings-change branch May 7, 2021 10:26
@yugaego
Copy link
Member

yugaego commented Aug 4, 2021

Hi Dmitry,
I've encountered an issue with the remapped C-n/p getting in the way when I really want to move to the next/previous line of the text itself. The theoretical solution "just nav away with C-p" didn't actually work for me.

Not sure if I can/willing to do anything else with it on the project level at the moment, so putting it's more FYI and future reference here.
Let me know if to file this somewhere else.

For my own needs, I just remapped the tooltip navigation - ironically - back to M-n/p.

@dgutov
Copy link
Member Author

dgutov commented Sep 29, 2023

@yugaego I'm sorry I missed this message.

I'll describe how it worked for me. First of all, as a maintainer I try to stay with the default settings of this package (with minimal tweaks, e.g. for numbers), because dogfooding is important, to make sure to catch the biggest usability problems, at least.

And I also use some minibuffer completion packages. In particular, Ivy. Ivy (like Helm, Vertico, icomplete-vertical-mode and etc) uses C-n and C-p for switching between completions. They seem pretty popular, too.

So a lot of times, when switching contexts between minibuffer completion and in-buffer completion I ended up using the same bindings to try to switch completions (they are positioned vertically as well, after all). But I persevered with M-n and M-p, and remembered to use them most of the time. And logically, they indeed seems like a good idea, because they don't override any important existing bindings.

After the switchover, there was a period of the problem with reverse: M-n/p were in the muscle memory, so I stumbled on them for a while (and I guess the "deprecated" bindings helped). But as I used C-n/p more, the conflicts with movement commands became less and less frequent (the brain remembers that having a rectangular popup visible changes things). So I guess I just C-g out when necessary.

Perhaps it's not an ideal solution still: many other completion systems use tabbing and cycling. We have a couple of different supported setups for this; maybe some particular one deserves more attention. But switching the default again would be a pretty big change.

@yugaego
Copy link
Member

yugaego commented Sep 30, 2023

Thanks for elaborating on this. It sounds reasonable.

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 this pull request may close these issues.

None yet

3 participants