From d2bbff8eca4d4d2582ea2fcd9de0137cfe9c8488 Mon Sep 17 00:00:00 2001 From: Rahul Martim Juliato Date: Thu, 10 Oct 2024 16:18:08 -0300 Subject: [PATCH] fix(evil): fixes C-u Uses the evil api for C-u being used to scroll. Makes C-u in insert mode works as delete. --- init.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/init.el b/init.el index 12a2376..f14483f 100644 --- a/init.el +++ b/init.el @@ -838,6 +838,8 @@ :init (setq evil-want-integration t) ;; Integrate `evil' with other Emacs features (optional as it's true by default). (setq evil-want-keybinding nil) ;; Disable default keybinding to set custom ones. + (setq evil-want-C-u-scroll t) ;; Makes C-u scroll + (setq evil-want-C-u-delete t) ;; Makes C-u delete on insert mode :config (evil-set-undo-system 'undo-tree) ;; Uses the undo-tree package as the default undo system @@ -849,10 +851,6 @@ (evil-set-leader 'normal (kbd "SPC")) (evil-set-leader 'visual (kbd "SPC")) - ;; Scrolls with C-d, C-u - (evil-define-key 'normal 'global (kbd "C-d") 'scroll-up) ;; Scroll down in normal mode. - (evil-define-key 'normal 'global (kbd "C-u") 'scroll-down) ;; Scroll up in normal mode. - ;; Keybindings for searching and finding files. (evil-define-key 'normal 'global (kbd " s f") 'consult-find) (evil-define-key 'normal 'global (kbd " s g") 'consult-grep)