From f348856cd38359a3719ca1a5b240342e590175cf Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 23 Feb 2023 19:04:54 -0500 Subject: [PATCH] docs(evil): add faq for kill-ring and clipboard sync Describes how to disable synchronization between the kill-ring and system clipboard. Close: #6947 Co-authored-by: rittelle --- modules/editor/evil/README.org | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/editor/evil/README.org b/modules/editor/evil/README.org index aedeab3d5..e3c9d7426 100644 --- a/modules/editor/evil/README.org +++ b/modules/editor/evil/README.org @@ -221,6 +221,24 @@ modify the syntax-table in all buffers of some mode, e.g. (add-hook! 'js2-mode-hook (modify-syntax-entry ?_ "w")) #+end_src +** How do I disable synchronization between the kill ring and system clipboard? + +In vim, operations that put or delete text (kill and yank in Emacs terminology) +act on the unnamed register by default. The unnamed register unrelated the +system clipboard. Evil uses the kill ring instead of the unnamed register. As +the kill ring is synchronized with the system clipboard by default, operations +like [[kbd:][dd]] or [[kbd:][cw]] place the killed text in the system clipboard, surprisingly so for +users who are used to the vim behavior. + +The synchronization between the system clipboard and kill ring can be disabled, +making these operations behave closer to their vim counterparts: +#+begin_src emacs-lisp +(setq select-enable-clipboard nil) +#+end_src + +Like in vim, the clipboard can still be accessed by using the [[kbd:][+]] register, e.g. +[[kbd:]["+dd]] or [[kbd:]["+cw]]. + * TODO Appendix #+begin_quote 🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]