fix evil keybindings for helm and friends

This commit is contained in:
petrucci4prez 2018-07-14 09:10:48 -04:00
parent 6d3d85a186
commit 6502f03f72
2 changed files with 54 additions and 76 deletions

50
conf.el
View File

@ -84,7 +84,9 @@
(use-package evil-collection (use-package evil-collection
:ensure t :ensure t
:after evil) :after evil
:init
(evil-collection-init '(which-key helm minibuffer mu4e)))
(use-package delight (use-package delight
:ensure t) :ensure t)
@ -101,6 +103,28 @@
:init :init
(which-key-mode)) (which-key-mode))
(use-package helm
:ensure t
:bind
("C-x C-f" . 'helm-find-files)
("C-x C-b" . 'helm-buffers-list)
("M-x" . 'helm-M-x)
("C-c h" . 'helm-command-prefix)
:init
(helm-mode 1)
:config
(setq helm-autoresize-max-height 0
helm-autoresize-max-height 40
helm-M-x-fuzzy-match t
helm-buffers-fuzzy-matching t
helm-recentf-fuzzy-match t
helm-semantic-fuzzy-match t
helm-imenu-fuzzy-match t
helm-scroll-amount 8))
(helm-autoresize-mode 1)
(require 'helm-config)
;; (use-package ido ;; (use-package ido
;; :ensure t ;; :ensure t
;; :bind ;; :bind
@ -122,27 +146,6 @@
;; (setq ido-file-extensions-order '(".org" ".txt" ".py" ".emacs" ".xml" ".el" ".ini" ".cfg" ".cnf")) ;; (setq ido-file-extensions-order '(".org" ".txt" ".py" ".emacs" ".xml" ".el" ".ini" ".cfg" ".cnf"))
(use-package helm
:ensure t
:bind
("C-x C-f" . 'helm-find-files)
("C-x C-b" . 'helm-buffers-list)
("M-x" . 'helm-M-x)
("C-c h" . 'helm-command-prefix)
:init
(helm-mode 1)
:config
(setq helm-autoresize-max-height 0
helm-autoresize-max-height 40
helm-M-x-fuzzy-match t
helm-buffers-fuzzy-matching t
helm-recentf-fuzzy-match t
helm-semantic-fuzzy-match t
helm-imenu-fuzzy-match t))
(helm-autoresize-mode 1)
(require 'helm-config)
;; (use-package smex ;; (use-package smex
;; :ensure t ;; :ensure t
;; :init ;; :init
@ -520,7 +523,7 @@ event of an error or nonlocal exit."
(org-agenda-files :maxlevel . 9)))) (org-agenda-files :maxlevel . 9))))
(setq org-refile-use-outline-path t) (setq org-refile-use-outline-path t)
(setq org-outline-path-complete-in-steps t) (setq org-outline-path-complete-in-steps nil)
;; (setq org-completion-use-ido t) ;; (setq org-completion-use-ido t)
(setq org-refile-allow-creating-parent-nodes 'confirm) (setq org-refile-allow-creating-parent-nodes 'confirm)
@ -1329,7 +1332,6 @@ and reverts all todo keywords to TODO"
cfw:fchar-top-right-corner ?┓)) cfw:fchar-top-right-corner ?┓))
(require 'mu4e) (require 'mu4e)
(evil-collection-init 'mu4e)
(setq mail-user-agent 'mu4e-user-agent (setq mail-user-agent 'mu4e-user-agent
mu4e-maildir "/mnt/data/Mail" mu4e-maildir "/mnt/data/Mail"
mu4e-drafts-folder "/gmail/[Gmail].Drafts" mu4e-drafts-folder "/gmail/[Gmail].Drafts"

View File

@ -122,7 +122,6 @@ These are commands that should work in any mode. Make the assumption that functi
** **
* packages * packages
** evil ** evil
*** packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package evil (use-package evil
:ensure t :ensure t
@ -134,29 +133,9 @@ These are commands that should work in any mode. Make the assumption that functi
(use-package evil-collection (use-package evil-collection
:ensure t :ensure t
:after evil) :after evil
#+END_SRC :init
*** keybindings (evil-collection-init '(which-key helm minibuffer mu4e)))
vim is all about escape, not...ctrl+g???
+BEGIN_SRC emacs-lisp
(define-key evil-normal-state-map [escape] 'keyboard-quit)
(define-key evil-visual-state-map [escape] 'keyboard-quit)
;; since ctrl+g and evil make no sense
(defun nd/minibuffer-keyboard-quit ()
"Abort recursive edit.
In Delete Selection mode, if the mark is active, just deactivate it;
then it takes a second \\[keyboard-quit] to abort the minibuffer."
(interactive)
(if (and delete-selection-mode transient-mark-mode mark-active)
(setq deactivate-mark t)
(when (get-buffer "*Completions*") (delete-windows-on "*Completions*"))
(abort-recursive-edit)))
(define-key minibuffer-local-ns-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-completion-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-must-match-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-isearch-map [escape] 'minibuffer-keyboard-quit)
#+END_SRC #+END_SRC
** delight ** delight
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -179,6 +158,30 @@ vim is all about escape, not...ctrl+g???
:init :init
(which-key-mode)) (which-key-mode))
#+END_SRC #+END_SRC
** helm
#+BEGIN_SRC emacs-lisp
(use-package helm
:ensure t
:bind
("C-x C-f" . 'helm-find-files)
("C-x C-b" . 'helm-buffers-list)
("M-x" . 'helm-M-x)
("C-c h" . 'helm-command-prefix)
:init
(helm-mode 1)
:config
(setq helm-autoresize-max-height 0
helm-autoresize-max-height 40
helm-M-x-fuzzy-match t
helm-buffers-fuzzy-matching t
helm-recentf-fuzzy-match t
helm-semantic-fuzzy-match t
helm-imenu-fuzzy-match t
helm-scroll-amount 8))
(helm-autoresize-mode 1)
(require 'helm-config)
#+END_SRC
** ido ** ido
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; (use-package ido ;; (use-package ido
@ -202,31 +205,6 @@ vim is all about escape, not...ctrl+g???
;; (setq ido-file-extensions-order '(".org" ".txt" ".py" ".emacs" ".xml" ".el" ".ini" ".cfg" ".cnf")) ;; (setq ido-file-extensions-order '(".org" ".txt" ".py" ".emacs" ".xml" ".el" ".ini" ".cfg" ".cnf"))
#+END_SRC #+END_SRC
** helm
#+BEGIN_SRC emacs-lisp
(use-package helm
:ensure t
:bind
("C-x C-f" . 'helm-find-files)
("C-x C-b" . 'helm-buffers-list)
("M-x" . 'helm-M-x)
("C-c h" . 'helm-command-prefix)
:init
(helm-mode 1)
:config
(setq helm-autoresize-max-height 0
helm-autoresize-max-height 40
helm-M-x-fuzzy-match t
helm-buffers-fuzzy-matching t
helm-recentf-fuzzy-match t
helm-semantic-fuzzy-match t
helm-imenu-fuzzy-match t
helm-scroll-amount 8
helm-echo-input-in-header-line t))
(helm-autoresize-mode 1)
(require 'helm-config)
#+END_SRC
** smex ** smex
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; (use-package smex ;; (use-package smex
@ -731,8 +709,7 @@ There are several types of tags I use:
*** completion *** completion
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-refile-use-outline-path t) (setq org-refile-use-outline-path t)
(setq org-outline-path-complete-in-steps t) (setq org-outline-path-complete-in-steps nil)
;; (setq org-completion-use-ido t)
#+END_SRC #+END_SRC
*** node creation *** node creation
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -1669,7 +1646,6 @@ only for gmail now
** basic ** basic
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(require 'mu4e) (require 'mu4e)
(evil-collection-init 'mu4e)
(setq mail-user-agent 'mu4e-user-agent (setq mail-user-agent 'mu4e-user-agent
mu4e-maildir "/mnt/data/Mail" mu4e-maildir "/mnt/data/Mail"
mu4e-drafts-folder "/gmail/[Gmail].Drafts" mu4e-drafts-folder "/gmail/[Gmail].Drafts"