The pyenv keybinds conflict with magit/org
The key binding for C-c C-s is bound to git-commit-signoff when editing a commit message in magit, however, if we're working in a python project, the same gets overwritten by pyenv mode.
You can bind it to something else with
(setq pyenv-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "C-c C-m") 'pyenv-mode-set)
(define-key map (kbd "C-c C-u") 'pyenv-mode-unset)
map))
My issue is with pyenv-mode overriding keybinds for other major modes, when it is set as a hook for python-mode only.
It is actually a global minor mode, which is why you are seeing the conflict.
It would be great to make it only enable with python-mode and not global. It is also conflicting with org-schedule (C-c C-s) - and when I'm inside org, I'm not at all working on any python project - no need of pyenv, but projectile is on. So can we use it as python-mode hook too?
It looks like #31 was submitted to do exactly that.
For anyone still annoyed by the overriding of keys, a workaround I've found is to delete the keymap of pyenv-mode-map and rebind the commands in the python-mode-map. One obvious downside to this is having the keys mapped permanently, whether in pyenv-mode or not, but since I use it pretty much all the time it works for me.
(use-package pyenv-mode
:init
(setq pyenv-mode-map
(let ((map (make-sparse-keymap)))
map))
:hook python-ts-mode python-mode
:bind
(:map python-ts-mode-map
("C-c C-s" . pyenv-mode-set)
("C-c C-u" . pyenv-mode-unset)))
I don't use pyenv-mode so I can't answer this myself, but would making this mode buffer local be the right solution? If so, we can do that.