From 8a5882ec6b012e6d9ebcab58c4a5f20c7a823382 Mon Sep 17 00:00:00 2001 From: justbur Date: Mon, 4 Jan 2016 20:40:27 -0500 Subject: [PATCH] evil-jumper: Move bindings to global motion map Having them in a minor mode map gives them precedence over other minor modes. It's better to put the bindings in the same place as the original evil jump commands which is the global motion map. --- layers/+distribution/spacemacs/packages.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/layers/+distribution/spacemacs/packages.el b/layers/+distribution/spacemacs/packages.el index 97b9b46b4..137e00652 100644 --- a/layers/+distribution/spacemacs/packages.el +++ b/layers/+distribution/spacemacs/packages.el @@ -582,7 +582,17 @@ :init (progn (setq evil-jumper-auto-save-interval 600) - (evil-jumper-mode t)))) + ;; Move keybindings into global motion state map + (add-hook 'evil-jumper-mode-hook + (lambda () + (if evil-jumper-mode + (progn + (define-key evil-motion-state-map (kbd "TAB") 'evil-jumper/forward) + (define-key evil-motion-state-map (kbd "C-o") 'evil-jumper/backward)) + (define-key evil-motion-state-map (kbd "TAB") 'evil-jump-forward) + (define-key evil-motion-state-map (kbd "C-o") 'evil-jump-backward)))) + (evil-jumper-mode t) + (setcdr evil-jumper-mode-map nil)))) (defun spacemacs/init-evil-lisp-state () (use-package evil-lisp-state