diff --git a/doc/pages/command-parsing.asciidoc b/doc/pages/command-parsing.asciidoc index f02ff0c2..8e2adfdf 100644 --- a/doc/pages/command-parsing.asciidoc +++ b/doc/pages/command-parsing.asciidoc @@ -51,33 +51,7 @@ delimiter matches that of its opening delimiter (respectively, `)`, `]`, `}`, and `>`). There is no way to escape the opening and closing characters, even if they -are nested inside some other kind of string. For example, this will **not** -work, because the `{` in the map command interferes with the delimiters for the -hook's command block: - ----- -# DOES NOT WORK -hook global WinSetOption filetype=latex %{ - map window user b 'o\begin{' -} ----- - -You can solve this by using a different outer delimiter: - ----- -hook global WinSetOption filetype=latex %[ - # Note different delimiter used -----^ - map window user b o\begin{ -] ----- - -...or just by including matching delimiters inside comments: - ----- -hook global WinSetOption filetype=latex %{ - map window user b o\begin{ # matched pair to keep Kakoune happy: } -} ----- +are nested inside some other kind of string. === Balanced Strings Examples @@ -89,6 +63,10 @@ hook global WinSetOption filetype=latex %{ - `"foo %{bar}"` is a single word whose content is *foo bar*. +- `%{foo\{}` is a parse error, since the `{}` delimiters are not balanced. + +- `%[foo\{]` contains *foo\{*, since it uses different delimiters. + == Non-Quoted words Other words are non-quoted. Non-quoted words are terminated by either a