Evil: Remove evil-leader

master
Pierre Neidhardt 2017-11-07 12:18:47 +01:00
parent eab706e84f
commit aa41e03977
2 changed files with 1 additions and 72 deletions

View File

@ -1,48 +0,0 @@
;;; Evil leader
;;; TODO: Remove evil leader config?
;;; Leader mode and its key must be set before evil-mode.
(evil-leader/set-leader "SPC")
(global-evil-leader-mode)
(evil-leader/set-key
"<return>" 'eshell-or-new-session
"\\" 'toggle-window-split
;; "a" 'org-agenda
"b" 'buffer-menu
"e" 'find-file
"k" 'kill-this-buffer
"t" 'org-find-first-agenda
"|" 'swap-windows)
(when (fboundp 'magit-status)
;; Since it is an autoload, we cannot use `with-eval-after-load'.
;; Use S-SPC instead of SPC to browse commit details.
(evil-leader/set-key "v" 'magit-status))
(when (fboundp 'emms-smart-browse)
(evil-leader/set-key "A" 'helm-emms)
(evil-leader/set-key "a" 'emms-smart-browse))
(with-eval-after-load 'emms
(evil-leader/set-key
"p" 'emms-pause
"n" 'emms-next))
(with-eval-after-load 'init-helm
(evil-leader/set-key
"b" 'helm-mini
"e" 'helm-find-files
"E" 'helm-find
"g" 'helm-grep-git-or-ag
"G" 'helm-grep-git-all-or-ag
"r" 'helm-resume))
(when (fboundp 'mu4e)
(require 'evil-mu4e nil t)
(evil-leader/set-key "m" 'mu4e-headers-unread))
;;; Since <SPC> is no longer available, as some replacements:
(evil-define-key 'motion Info-mode-map (kbd "C-SPC") 'Info-scroll-up)
(evil-define-key 'motion help-mode-map (kbd "C-SPC") 'scroll-up-command)
(evil-define-key 'motion pdf-view-mode-map (kbd "C-SPC") 'pdf-view-scroll-up-or-next-page)
(provide 'init-evil-leader)

View File

@ -31,11 +31,6 @@
(setq-default evil-symbol-word-search t)
;;; The evil-leader package has that over regular bindings that it centralizes
;;; the leader key configuration and automatically makes it available in relevant
;;; states. It is not really needed with EXWM however.
(when (require 'evil-leader nil t) (require 'init-evil-leader))
;;; Commenting.
;;; M-; comments next line in VISUAL. This is because of a different newline
;;; definition between Emacs and Vim.
@ -122,26 +117,8 @@
(with-eval-after-load 'init-helm (require 'init-evil-helm))
;; TODO: Delete this.
;; (with-eval-after-load 'debbugs (require 'init-evil-debbugs nil t))
;; (with-eval-after-load 'emms (require 'init-evil-emms))
;; TODO: `image-mode-map' is the parent of `pdf-view-mode-map'. A bug(?) in
;; image-mode-map and pdf-mode-map seem to conflict with Evil.
;; See https://github.com/emacs-evil/evil/issues/938
;; and https://github.com/politza/pdf-tools/issues/324.
;; Changing load order only changes which mode overrides the other.
;; (with-eval-after-load 'pdf-view (require 'init-evil-pdf))
;; (with-eval-after-load 'image+ (require 'init-evil-image+))
;; (with-eval-after-load 'transmission (require 'init-evil-transmission))
;; (with-eval-after-load 'ztree-diff (require 'init-evil-ztree))
;;; Emacs special modes
;; (when (require 'evil-special-modes nil t)
;; (evil-special-modes-init)
;; (require 'evil-minibuffer)
;; (evil-minibuffer-init))
;;; nXML
;;; TODO: Add to Emacs special modes?
;;; TODO: Add to evil-collection?
(evil-define-key 'normal nxml-mode-map
(kbd "C-j") 'nxml-forward-element
(kbd "C-k") 'nxml-backward-element