Skip to content

Commit

Permalink
Vertico: Unbind c-u in insert (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
jojojames committed Nov 23, 2024
1 parent cdfe351 commit 8149fd1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modes/vertico/evil-collection-vertico.el
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
(require 'evil-collection)
(require 'vertico nil t)

(defcustom evil-collection-vertico-want-want-C-u-in-insert nil
"When non nil, C-u may be bound in insert state."
:group 'evil-collection
:type 'boolean)

;;;###autoload
(defun evil-collection-vertico-setup ()
"Set up `evil' bindings for `vertico'."
Expand All @@ -38,7 +43,8 @@
(when evil-collection-setup-minibuffer
(when evil-want-C-u-scroll
(evil-collection-define-key 'normal 'vertico-map
(kbd "C-u") 'vertico-scroll-down)
(kbd "C-u") 'vertico-scroll-down))
(when evil-collection-vertico-want-want-C-u-in-insert
(unless evil-want-C-u-delete
(evil-collection-define-key 'insert 'vertico-map
(kbd "C-u") 'vertico-scroll-down)))
Expand Down

0 comments on commit 8149fd1

Please sign in to comment.