comparison 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
comparison
equal deleted inserted replaced
24530:51e01f7c2069 24531:3bfec39ce31c
59 59
60 Vim9 script and legacy Vim script can be mixed. There is no requirement to 60 Vim9 script and legacy Vim script can be mixed. There is no requirement to
61 rewrite old scripts, they keep working as before. You may want to use a few 61 rewrite old scripts, they keep working as before. You may want to use a few
62 `:def` functions for code that needs to be fast. 62 `:def` functions for code that needs to be fast.
63 63
64 *:vim9* *:vim9cmd* 64 :vim9[cmd] {cmd} *:vim9* *:vim9cmd*
65 :vim9[cmd] {cmd}
66 Execute {cmd} using Vim9 script syntax and semantics. 65 Execute {cmd} using Vim9 script syntax and semantics.
67 Useful when typing a command and in a legacy script or 66 Useful when typing a command and in a legacy script or
68 function. 67 function.
68
69 :leg[acy] {cmd} *:leg* *:legacy*
70 Execute {cmd} using legacy script syntax and semantics. Only
71 useful in a Vim9 script or a :def function.
72 Note that {cmd} cannot use local variables, since it is parsed
73 with legacy expression syntax.
69 74
70 ============================================================================== 75 ==============================================================================
71 76
72 2. Differences from legacy Vim script *vim9-differences* 77 2. Differences from legacy Vim script *vim9-differences*
73 78