From 221fc38bd9993b4bf96a357ac00be5ecc1516059 Mon Sep 17 00:00:00 2001 From: Cedric Sodhi Date: Thu, 22 Oct 2020 14:39:10 +0200 Subject: [PATCH] Disabled backtick escaping Fixes issue #2377 by removing the ability to escape backticks in backticks in compliance with asciidoc's behaviour. Adjusted hooks.asciidoc, keys.asciidoc, and command-parsing.asciidoc to match accordingly. --- doc/pages/command-parsing.asciidoc | 10 +++++----- doc/pages/hooks.asciidoc | 15 ++++----------- doc/pages/keys.asciidoc | 5 +++-- rc/tools/doc.kak | 2 +- 4 files changed, 13 insertions(+), 19 deletions(-) diff --git a/doc/pages/command-parsing.asciidoc b/doc/pages/command-parsing.asciidoc index dcf3724f..e4b62123 100644 --- a/doc/pages/command-parsing.asciidoc +++ b/doc/pages/command-parsing.asciidoc @@ -69,12 +69,12 @@ No other escaping takes place in balanced strings. Other words are non-quoted. Non-quoted words end either on a whitespaces or a `;`. -If they start with `\\` followed by `%`, `'` or `"`, then that leading -`\\` is discarded. +If they start with `\` followed by `%`, `'` or `"`, then that leading +`\` is discarded. -If a whitespace or `;` is preceded by `\\`, then the `\\` is discarded -and the whitespace or `;` becomes part of the word. Any other `\\` -is treated as a literal `\\`. +If a whitespace or `;` is preceded by `\`, then the `\` is discarded +and the whitespace or `;` becomes part of the word. Any other `\` +is treated as a literal `\`. == Typed Expansions diff --git a/doc/pages/hooks.asciidoc b/doc/pages/hooks.asciidoc index af99071b..d6a63ba6 100644 --- a/doc/pages/hooks.asciidoc +++ b/doc/pages/hooks.asciidoc @@ -205,17 +205,10 @@ vars are available: == Disabling Hooks -Any normal mode command can be prefixed with `\ ` which will disable hook -execution for the duration of 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. - -A less temporary alternative is to set the `disabled_hooks` option which -accepts a regex describing which hooks won't be executed. -For example indentation hooks can be disabled with '.*-indent'. +Hooks can be disabled temporarily by prefixing any normal mode command by `\` +(see <>) and permanently by setting the `disabled_hooks` option +which accepts a regex describing which hooks won't be executed. For example +indentation hooks can be disabled with '.*-indent'. Finally, hook execution can be disabled while using the `execute-keys` or `evaluate-commands` commands by using the `-no-hooks` switch. diff --git a/doc/pages/keys.asciidoc b/doc/pages/keys.asciidoc index d1dad4fb..5bdb7a03 100644 --- a/doc/pages/keys.asciidoc +++ b/doc/pages/keys.asciidoc @@ -85,9 +85,10 @@ the right of the end of each selection. == Disabling Hooks -Any normal mode command can be prefixed with *\* which will disable hook execution +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). +move to, so `\i` will disable hooks for the whole insert session) (see +<>). As autoindentation is implemented in terms of hooks, this can be used to disable it when pasting text. diff --git a/rc/tools/doc.kak b/rc/tools/doc.kak index 5a6c8e1d..ade3fcbe 100644 --- a/rc/tools/doc.kak +++ b/rc/tools/doc.kak @@ -117,7 +117,7 @@ define-command -params 1 -hidden doc-render %{ set-option buffer doc_render_ranges %val{timestamp} doc-render-regex \B(?