Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

h and l are incorrectly bound if evil-magit is loaded lazily #32

Open
sooheon opened this issue Jun 28, 2017 · 4 comments
Open

h and l are incorrectly bound if evil-magit is loaded lazily #32

sooheon opened this issue Jun 28, 2017 · 4 comments

Comments

@sooheon
Copy link

sooheon commented Jun 28, 2017

If I use :after magit in the evil-magit use-package decl. to defer loading, h and l keys move cursor regardless of the value of evil-magit-want-horizontal-movement. I found that I have to not defer evil-magit at all in order to fix this issue.

;; This setting causes h/l to move cursor in magit buffers
(use-package magit
  :config
  (setq magit-popup-show-common-commands nil))

(use-package evil-magit
  :after magit
  :init
  (add-hook 'magit-mode-hook 'turn-off-evil-snipe-override-mode)
  (setq evil-magit-want-horizontal-movement nil))
@justbur
Copy link
Member

justbur commented Jun 28, 2017

Can you take out the general stuff in your example? I keep getting errors (about general, nvmap, etc) trying to use your example.

@sooheon
Copy link
Author

sooheon commented Jun 29, 2017

Updated, general is just a key binding package, you can still check by manually calling magit-status.

@justbur
Copy link
Member

justbur commented Jun 29, 2017

Hm, I can't reproduce this. I just tried this from emacs -Q and everything seems fine with h and l

(package-initialize)

(use-package magit
  :config
  (setq magit-popup-show-common-commands nil))

(use-package evil-magit
  :after magit
  :init
  (setq evil-magit-want-horizontal-movement nil))

(evil-mode)

@ambihelical
Copy link

:after doesn't actually defer loading, at least in the use-package sense, it imposes an ordering. In fact if you have use-package-always-defer set, the behavior may be that evil-magit doesn't load at all at least with the config the OP has. The use-package site has this warning:

Note: Pay attention if you set use-package-always-defer to t, and also use the :after keyword, as you will need to specify how the declared package is to be loaded: e.g., by some :bind. If you're not using one of tho mechanisms that registers autoloads, such as :bind or :hook, and your package manager does not provide autoloads, it's possible that without adding :demand t to those declarations, your package will never be loaded.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants