Add evil leader on "jk" in ido minibuffer

This commit is contained in:
syl20bnr 2014-11-16 00:14:50 -05:00
parent 1e3e8c6ccc
commit 707c101fa3

View file

@ -1434,7 +1434,19 @@ determine the state to enable when escaping from the insert state.")
(define-key ido-completion-map (kbd "<up>") 'ido-prev-match)
(define-key ido-completion-map (kbd "<down>") 'ido-next-match)
(define-key ido-completion-map (kbd "<left>") 'ido-delete-backward-updir)
(define-key ido-completion-map (kbd "<right>") 'ido-exit-minibuffer)))))
(define-key ido-completion-map (kbd "<right>") '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