From cf298bbb3f9ceb246e1e214874daab2d7d77c678 Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Thu, 2 Nov 2017 14:57:11 +0100 Subject: [PATCH] emacs - make Y behave correctly --- emacs/.emacs.d/init.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 1c67a44..2b10c03 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -306,6 +306,10 @@ (swiper (format "\\<%s\\>" (thing-at-point thing)))) +(defun my/evil-yank-till-eol () + (interactive) + (evil-yank-characters (point) (point-at-eol))) + (use-package evil :ensure t :demand t @@ -320,6 +324,7 @@ (my/kill-window-or-buffer))) (define-key evil-normal-state-map "gb" 'my/evil-go-back) (define-key evil-normal-state-map "gn" 'my/evil-go-forward) + (define-key evil-normal-state-map "Y" 'my/evil-yank-till-eol) (define-key evil-motion-state-map [down-mouse-1] 'silence) (define-key evil-motion-state-map [mouse-1] 'silence) (define-key evil-insert-state-map (kbd "") 'nope)