From 57d988a1df839754da1f9ab4cb4d3f66e976fd92 Mon Sep 17 00:00:00 2001 From: Konfekt Date: Fri, 18 Apr 2025 21:19:39 +0200 Subject: [PATCH] add short legacy vimscript intro as suggested by @kennypete --- vim9script.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vim9script.md b/vim9script.md index 1c04b7e8..3b9a0077 100644 --- a/vim9script.md +++ b/vim9script.md @@ -8,16 +8,20 @@ contributors: --- Vim9Script is a modern scripting language introduced in Vim 9.0. -It improves performance, readability, and structure over legacy Vimscript. +It is designed to replace legacy Vimscript (also called VimL), which is a sequence of ex-commands enhanced with scripting constructs like variables, functions, and control flow. + +Unlike legacy Vimscript, Vim9Script enforces stricter syntax, improves performance, and supports modern programming features such as strong typing, classes, lambdas, and modules. + Try [vim9-conversion-aid](https://github.com/ubaldot/vim9-conversion-aid) as a starting point to convert legacy Vimscript to Vim9Script. ```vim vim9script + # The vim9script namespace, above, is required to distinguish a Vim9 script # *.vim file from a legacy vimscript file. In Vim's command-line mode, # or in a legacy script, using the command `:vim9cmd` (or just `:vim9`) before # a command also evaluates and executes code as Vim9 script. -# + # There is no distinction between single and multi-line comments. # Use # inside a line at any position to comment out all following characters.