Mercurial > vim
diff runtime/doc/vim9.txt @ 24531:3bfec39ce31c v8.2.2805
patch 8.2.2805: Vim9: cannot use legacy syntax in Vim9 script
Commit: https://github.com/vim/vim/commit/96cf4ba8fb96e5778192d2dab7458b9a7da0a49d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 24 14:15:41 2021 +0200
patch 8.2.2805: Vim9: cannot use legacy syntax in Vim9 script
Problem: Vim9: cannot use legacy syntax in Vim9 script.
Solution: Add the :legacy command.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 24 Apr 2021 14:30:04 +0200 |
parents | 9f41bfdbc6fc |
children | e3ec2ec8841a |
line wrap: on
line diff
--- a/runtime/doc/vim9.txt +++ b/runtime/doc/vim9.txt @@ -61,12 +61,17 @@ Vim9 script and legacy Vim script can be rewrite old scripts, they keep working as before. You may want to use a few `:def` functions for code that needs to be fast. - *:vim9* *:vim9cmd* -:vim9[cmd] {cmd} +:vim9[cmd] {cmd} *:vim9* *:vim9cmd* Execute {cmd} using Vim9 script syntax and semantics. Useful when typing a command and in a legacy script or function. +:leg[acy] {cmd} *:leg* *:legacy* + Execute {cmd} using legacy script syntax and semantics. Only + useful in a Vim9 script or a :def function. + Note that {cmd} cannot use local variables, since it is parsed + with legacy expression syntax. + ============================================================================== 2. Differences from legacy Vim script *vim9-differences*