From 707c101fa3647158e7044495afbd14589b0c479f Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sun, 16 Nov 2014 00:14:50 -0500 Subject: [PATCH] Add evil leader on "jk" in ido minibuffer --- spacemacs/packages.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 603d22c69..2a5c7df28 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1434,7 +1434,19 @@ determine the state to enable when escaping from the insert state.") (define-key ido-completion-map (kbd "") 'ido-prev-match) (define-key ido-completion-map (kbd "") 'ido-next-match) (define-key ido-completion-map (kbd "") 'ido-delete-backward-updir) - (define-key ido-completion-map (kbd "") 'ido-exit-minibuffer))))) + (define-key ido-completion-map (kbd "") 'ido-exit-minibuffer))) + :config + (progn + ;; experimental: press "jk" to trigger evil-leader with ido-mode specific + ;; commands + (when dotspacemacs-feature-toggle-leader-on-jk + (evil-leader/set-key-for-mode 'ido-mode + "b" 'ido-invoke-in-horizontal-split + "t" 'ido-invoke-in-new-frame + "v" 'ido-invoke-in-vertical-split + "x" 'ido-invoke-in-other-window) + (key-chord-define ido-file-completion-map (kbd "jk") + (cdr (assoc 'ido-mode evil-leader--mode-maps))))))) (defun spacemacs/init-js2-mode () (use-package js2-mode