aboutsummaryrefslogtreecommitdiff
path: root/evil-maps.el
diff options
context:
space:
mode:
authorTom Dalziel <tom_dl@hotmail.com>2021-11-16 21:37:08 +0000
committerTom Dalziel <33435574+tomdl89@users.noreply.github.com>2021-12-19 18:29:22 +0100
commit3db357b8531f2e1c308f143506a5de850e532baf (patch)
tree8f940a38af55cd88c634db8761f636e1d34aec5f /evil-maps.el
parentb00018bf550fbbe1b55165579e6ede973d70f53b (diff)
Define the insert state keybindings in replace state
Diffstat (limited to 'evil-maps.el')
-rw-r--r--evil-maps.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/evil-maps.el b/evil-maps.el
index 3c0f6a8..65fd51f 100644
--- a/evil-maps.el
+++ b/evil-maps.el
@@ -385,10 +385,10 @@
("\C-r" . evil-paste-from-register)
("\C-y" . evil-copy-from-above)
("\C-e" . evil-copy-from-below)
- ("\C-n" . evil-complete-next)
- ("\C-p" . evil-complete-previous)
- ("\C-x\C-n" . evil-complete-next-line)
- ("\C-x\C-p" . evil-complete-previous-line)
+ ("\C-n" . evil-complete-next) ;; Completion commands
+ ("\C-p" . evil-complete-previous) ;; don't yet behave correctly
+ ("\C-x\C-n" . evil-complete-next-line) ;; in replace state
+ ("\C-x\C-p" . evil-complete-previous-line) ;; TODO - fix this
("\C-t" . evil-shift-right-line)
("\C-d" . evil-shift-left-line)
("\C-a" . evil-paste-last-insertion)
@@ -400,9 +400,9 @@
,@(when evil-want-C-u-delete
'(("\C-u" . evil-delete-back-to-indentation)))
([mouse-2] . mouse-yank-primary))
- "Evil's bindings for insert state (for
-`evil-insert-state-map'), excluding <delete>, <escape>, and
-`evil-toggle-key'.")
+ "Evil's bindings for insert & replace states.
+Used in `evil-insert-state-map' and `evil-replace-state-map',
+excluding <delete>, <escape>, and `evil-toggle-key'.")
(defun evil-update-insert-state-bindings (&optional _option-name remove force)
"Update bindings in `evil-insert-state-map'.
@@ -440,6 +440,8 @@ included in `evil-insert-state-bindings' by default."
(define-key evil-replace-state-map (kbd "DEL") 'evil-replace-backspace)
(define-key evil-replace-state-map [escape] 'evil-normal-state)
(define-key evil-replace-state-map [insert] 'evil-append)
+(dolist (binding evil-insert-state-bindings)
+ (define-key evil-replace-state-map (car binding) (cdr binding)))
;;; Emacs state