From 26436752ec7c6477e081ff8e8d9fe916a86321fa Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 24 Jan 2020 19:50:29 -0500 Subject: [PATCH] Mention evil-{want-Y-yank-to-eol,move-cursor-back} in evil readme --- modules/editor/evil/README.org | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/modules/editor/evil/README.org b/modules/editor/evil/README.org index b256b07ec..0549a9316 100644 --- a/modules/editor/evil/README.org +++ b/modules/editor/evil/README.org @@ -16,6 +16,8 @@ - [[#configuration][Configuration]] - [[#removing-evil-mode][Removing evil-mode]] - [[#restoring-old-substitution-behavior-on-ss][Restoring old substitution behavior on s/S]] + - [[#restoring-old-y-behavior-yank-the-whole-line][Restoring old Y behavior (yank the whole line)]] + - [[#disabling-cursor-movement-when-exiting-insert-mode][Disabling cursor movement when exiting insert mode]] * Description This holy module brings the vim experience to Emacs. @@ -171,3 +173,23 @@ To disable evil-snipe on s/S, you can either: added to =$DOOMDIR/packages.el=, but this will also disable incremental highlighting for the f/F/t/T motions keys. 3. Or use =cl= and =cc=, respectively; they do the same thing. +** Restoring old Y behavior (yank the whole line) +Doom changes the behavior of the =Y= key in normal mode to yank-to-EOL +(equivalent to =y$=). This was to make it consistent with the =C= and =D= +capital operators, and because it was redundant with =yy=, which is easier to +type than =y$=. + +If you prefer the old behavior, it can be reversed with: + +#+BEGIN_SRC elisp +;; add to ~/.doom.d/config.el +(setq! evil-want-Y-yank-to-eol nil) +#+END_SRC +** Disabling cursor movement when exiting insert mode +Vim (and evil) move the cursor one character back when exiting insert mode. If +you prefer that it didn't, set: + +#+BEGIN_SRC elisp +;; add to ~/.doom.d/config.el +(setq evil-move-cursor-back nil) +#+END_SRC