diff options
| author | Brian Leung <leungbk@posteo.net> | 2021-09-12 01:53:12 -0700 |
|---|---|---|
| committer | Youmu <condy0919@gmail.com> | 2021-09-12 16:59:27 +0800 |
| commit | 8a75a0365629c421ea785f1393f577f9d92af58e (patch) | |
| tree | 50f3d3972d7b18abf702332a6b03340c12b5c3b4 /modes | |
| parent | a3e7ad3b0d1fdedaaa870873fdee79318f0d2b26 (diff) | |
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.
Diffstat (limited to 'modes')
| -rw-r--r-- | modes/comint/evil-collection-comint.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modes/comint/evil-collection-comint.el b/modes/comint/evil-collection-comint.el index da15907..2838a8b 100644 --- a/modes/comint/evil-collection-comint.el +++ b/modes/comint/evil-collection-comint.el @@ -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)) |
