comint: Bind comint-kill-input to C-u

In Vim insert mode, C-u deletes to the beginning of the line, so we
make an analogous binding for comint buffers.
This commit is contained in:
Brian Leung 2021-09-12 01:53:12 -07:00 committed by Youmu
parent a3e7ad3b0d
commit 8a75a03656
1 changed files with 5 additions and 0 deletions

View File

@ -50,6 +50,11 @@
(kbd "C-p") #'comint-previous-input
(kbd "C-n") #'comint-next-input)
;; TODO: What if the user changes `evil-want-C-u-delete' after this is run?
(when evil-want-C-u-delete
(evil-collection-define-key 'insert 'comint-mode-map
(kbd "C-u") #'comint-kill-input))
(evil-collection-define-key 'insert 'comint-mode-map
(kbd "<up>") #'comint-previous-input
(kbd "<down>") #'comint-next-input))