Introducing Vim 9.0 and the New Vim9 Script Language
Vim 9.0 marks a major release that introduces Vim9 Script—a compiled, high‑performance scripting language with modern syntax, improved execution speed, and new features such as typed variables, streamlined function definitions, module export/import, and plans for class support, while preserving compatibility with existing Vim scripts.
In memory of Sven Guckes, a core maintainer of Vim who passed away in February 2022, the Vim community releases Vim 9.0, a significant step forward that brings many improvements and a brand‑new scripting language called Vim9 Script.
The previous stable release was Vim 8.2 (December 2019); since then, numerous patches have been applied, fixing bugs, security issues, and increasing code coverage, making Vim 9.0 the most reliable version to date.
Vim9 Script aims to dramatically boost performance by compiling commands into efficient bytecode, promising speed gains of 10‑100× compared with the traditional Vim script, which parses each line at runtime.
Beyond speed, Vim9 Script adopts a syntax closer to mainstream languages (JavaScript, TypeScript, Java). Functions are defined with def and must declare parameters and return types; variables are declared with var and can have explicit or inferred types.
Typical Vim script constructs such as line‑continuation backslashes, the call keyword, let for assignment, and eval are no longer required, making the language feel more like conventional programming languages.
Large scripts can now be split into modules: export makes functions or variables available to other scripts, and import brings them in, enabling flexible plugin development.
Comments now start with # , replacing the older double‑quote syntax that conflicted with string literals, aligning Vim9 Script with languages such as Python and shell scripts.
Existing traditional Vim scripts continue to work unchanged; there are no plans to drop backward compatibility, and the transition is not expected to be as disruptive as Python 2 to Python 3.
Future work includes adding class support—keywords have already been reserved—so that developers familiar with object‑oriented programming can use classes directly in Vim9 Script.
For more details, see https://www.vim.org/vim90.php .
IT Services Circle
Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.