From 2adbbb4129174661ca43d71e4ad245bd41abc066 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 19 Feb 2017 13:18:00 +0000 Subject: [PATCH] Document backslash disabling hooks Fixes #1223 --- README.asciidoc | 10 ++++++++++ doc/manpages/keys.asciidoc | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/README.asciidoc b/README.asciidoc index 7e421d14..78b44b53 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -398,6 +398,16 @@ command itself. for example, `3W` selects 3 consecutive words and `3w` select the third word on the right of selection end. +Disabling Hooks +~~~~~~~~~~~~~~~ + +Any normal mode command can be prefixed with `\` which will disable hook execution +for the duration for the command (including the duration of modes the command could +move to, so `\i` will disable hooks for the whole insert session). + +As autoindentation is implemented in terms of hooks, this can be used to disable +it when pasting text. + Changes ~~~~~~~ diff --git a/doc/manpages/keys.asciidoc b/doc/manpages/keys.asciidoc index ea39f233..eea34ba3 100644 --- a/doc/manpages/keys.asciidoc +++ b/doc/manpages/keys.asciidoc @@ -67,6 +67,25 @@ Insert mode **:: escape to normal mode for a single command +Using Counts +------------ + +In normal mode, commands can be prefixed with a numeric count, which can control +the command behaviour. + +for example, *3W* selects 3 consecutive words and *3w* select the third word on +the right of selection end. + +Disabling Hooks +--------------- + +Any normal mode command can be prefixed with *\* which will disable hook execution +for the duration for the command (including the duration of modes the command could +move to, so *\i* will disable hooks for the whole insert session). + +As autoindentation is implemented in terms of hooks, this can be used to disable +it when pasting text. + Movement -------- 'word' is a sequence of alphanumeric characters or underscore, and 'WORD'