evil-multiedit: simplify keybinding setup

This commit is contained in:
Henrik Lissner 2016-06-04 23:27:53 -04:00
parent 805e1fa8ff
commit a7d97a2f42
4 changed files with 14 additions and 22 deletions

View file

@ -58,11 +58,6 @@ during compilation."
'with-no-warnings)
(with-eval-after-load ',feature ,@forms)))
(defmacro in! (dir &rest forms)
(declare (indent defun))
`(let ((default-directory ,dir))
,@forms))
(defmacro noop! (name &optional args)
`(defun ,name ,args (interactive) (error "%s not implemented!" name)))

View file

@ -227,19 +227,14 @@
:commands (evil-multiedit-match-all
evil-multiedit-match-and-next
evil-multiedit-match-and-prev
evil-multiedit-match-symbol-and-next
evil-multiedit-match-symbol-and-prev
evil-multiedit-toggle-or-restrict-region
evil-multiedit-next
evil-multiedit-prev
evil-multiedit-abort
evil-multiedit-ex-match)
:config
(map! :map evil-multiedit-state-map
"RET" 'evil-multiedit-toggle-or-restrict-region
"C-n" 'evil-multiedit-next
"C-p" 'evil-multiedit-prev
:map evil-multiedit-insert-state-map
"C-n" 'evil-multiedit-next
"C-p" 'evil-multiedit-prev))
:config (evil-multiedit-default-keybinds))
(use-package evil-indent-plus
:commands (evil-indent-plus-i-indent

View file

@ -77,6 +77,8 @@
(switch-to-buffer b))))
(after! evil
;; The evil command window has a mind of its own (uses `switch-to-buffer'). We
;; monkey patch it to use pop-to-buffer.
(defun doom*evil-command-window (hist cmd-key execute-fn)
(when (eq major-mode 'evil-command-window-mode)
(user-error "Cannot recursively open command line window"))
@ -96,10 +98,10 @@
(advice-add 'evil-command-window :override 'doom*evil-command-window))
(after! help-mode
;; So that file links in help buffers don't replace the help buffer, we need
;; to redefine these three button types to use `doom/popup-save' and
;; `switch-to-buffer' rather than `pop-to-buffer'. This way, it is sure to
;; open links in the source buffer.
;; Following links in help buffers sometimes uses itself or other-window. We
;; want it only to replace the buffer we opened the popup from. To do this we
;; must redefine these three button types to use `doom/popup-save' and
;; `switch-to-buffer' rather than `pop-to-buffer'.
(define-button-type 'help-function-def
:supertype 'help-xref
'help-function (lambda (fun file)

View file

@ -236,10 +236,10 @@
;; evil-multiedit
:v "R" 'evil-multiedit-match-all
:n "M-C-D" 'evil-multiedit-restore
:nv "M-d" 'evil-multiedit-match-and-next
:nv "M-D" 'evil-multiedit-match-and-prev
(:map evil-multiedit-state-map
:v "RET" 'evil-multiedit-toggle-or-restrict-region)
:n "M-d" 'evil-multiedit-match-symbol-and-next
:n "M-D" 'evil-multiedit-match-symbol-and-prev
:v "M-d" 'evil-multiedit-match-and-next
:v "M-D" 'evil-multiedit-match-and-prev
;; evil-surround
:v "S" 'evil-surround-region