From bc2385ac6c936c543990f6569d18bc88fc6dce87 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 26 Nov 2014 23:48:02 -0500 Subject: [PATCH] Add `hjkl` navigation for paradox packages list Same strategy as with magit --- contrib/paradox/packages.el | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/contrib/paradox/packages.el b/contrib/paradox/packages.el index 9af18df61..f058f27c0 100644 --- a/contrib/paradox/packages.el +++ b/contrib/paradox/packages.el @@ -12,11 +12,12 @@ which require an initialization must be listed explicitly in the list.") ;; (defun paradox/init-paradox () (use-package paradox - :commands paradox-list-packages :defer t :init (progn + (defun spacemacs/paradox-list-packages () + "Load depdendencies for auth and open the package list." (interactive) (require 'epa-file) (require 'auth-source) @@ -34,10 +35,16 @@ which require an initialization must be listed explicitly in the list.") paradox-token))))) (paradox-list-packages nil)) - (eval-after-load "evil-leader" - (evil-leader/set-key - "aP" 'spacemacs/paradox-list-packages)) - ) + (add-to-list 'evil-emacs-state-modes 'paradox-menu-mode) + (evil-add-hjkl-bindings paradox-menu-mode-map 'emacs + "H" 'paradox-menu-quick-help + "J" 'paradox-next-describe + "K" 'paradox-previous-describe + "L" 'paradox-menu-view-commit-list) + + (eval-after-load "evil-leader" + (evil-leader/set-key + "aP" 'spacemacs/paradox-list-packages))) ))