From accc619c0f88561ee9fda57bb8870db0657eef98 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Fri, 26 Jun 2020 11:12:25 +0300 Subject: [PATCH] doc faq: Document hook disabling with `\i` --- doc/pages/faq.asciidoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/pages/faq.asciidoc b/doc/pages/faq.asciidoc index bcad010e..5dbed3b5 100644 --- a/doc/pages/faq.asciidoc +++ b/doc/pages/faq.asciidoc @@ -294,3 +294,16 @@ open buffers: ---- :eval -buffer * e! ---- + +=== Why is the text I pasted into a buffer completely mangled? + +In order to assist users with writing code, some buffers come with hooks that +automatically indent the text inserted. Pasting the contents of the clipboard +into a buffer in insert mode triggers this indentation functionality, +resulting into mangled text. + +To prevent that from happening: + +* disable hooks and enter insert mode with `\i` +* insert text into the buffer (e.g. paste the clipboard's contents) +* exit insert-mode, restoring hooks with ``