diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-07-27 21:17:32 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-27 21:17:32 +0200 |
commit | 5d7c2df536c17db4a9c61e0760bdcf78d0db7330 (patch) | |
tree | 74a24ee4dec7bed9866c328da2bf3ac00460ef77 /runtime/doc/map.txt | |
parent | 53ba05b09075f14227f9be831a22ed16f7cc26b2 (diff) |
patch 8.2.3228: cannot use a simple block for the :command argumentv8.2.3228
Problem: Cannot use a simple block for the :command argument. (Maarten
Tournoij)
Solution: Recognize a simple {} block. (issue #8623)
Diffstat (limited to 'runtime/doc/map.txt')
-rw-r--r-- | runtime/doc/map.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 970bbc923e..8d5caf43a9 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1572,6 +1572,16 @@ feature. Use the full name for new scripts. Replacement text ~ +The {repl} argument is normally one long string, possibly with "|" separated +commands. A special case is when the argument is "{", then the following +lines, up to a line starting with "}" are used and |Vim9| syntax applies. +Example: > + :command MyCommand { + echo 'hello' + g:calledMyCommand = true + } +No nesting is supported. + The replacement text {repl} for a user defined command is scanned for special escape sequences, using <...> notation. Escape sequences are replaced with values from the entered command line, and all other text is copied unchanged. |