Mercurial > vim
diff runtime/doc/map.txt @ 25382:b80e4e9c4988 v8.2.3228
patch 8.2.3228: cannot use a simple block for the :command argument
Commit: https://github.com/vim/vim/commit/5d7c2df536c17db4a9c61e0760bdcf78d0db7330
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jul 27 21:17:32 2021 +0200
patch 8.2.3228: cannot use a simple block for the :command argument
Problem: Cannot use a simple block for the :command argument. (Maarten
Tournoij)
Solution: Recognize a simple {} block. (issue #8623)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 27 Jul 2021 21:30:08 +0200 |
parents | 840665e74421 |
children | bdda48f01a68 |
line wrap: on
line diff
--- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1572,6 +1572,16 @@ feature. Use the full name for new scri 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.