Document backslash disabling hooks

Fixes #1223
This commit is contained in:
Maxime Coste 2017-02-19 13:18:00 +00:00
parent edc2a88643
commit 2adbbb4129
2 changed files with 29 additions and 0 deletions

View File

@ -398,6 +398,16 @@ command itself.
for example, `3W` selects 3 consecutive words and `3w` select the third word on for example, `3W` selects 3 consecutive words and `3w` select the third word on
the right of selection end. 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 Changes
~~~~~~~ ~~~~~~~

View File

@ -67,6 +67,25 @@ Insert mode
*<a-;>*:: *<a-;>*::
escape to normal mode for a single command 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 Movement
-------- --------
'word' is a sequence of alphanumeric characters or underscore, and 'WORD' 'word' is a sequence of alphanumeric characters or underscore, and 'WORD'