Vim 9.0 is released!

165 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 28, 2022, 10:55:41 AM6/28/22
to vim-an...@vim.org, vim...@vim.org, v...@vim.org, vim...@vim.org


Hello Vim users!

Announcing: Vim (Vi IMproved) version 9.0


This is a major release. The main new feature is the addition of Vim9
script. Besides that a lot of bugs have been fixed, documentation was
updated, test coverage was improved, etc.

Read the announcement online: https://www.vim.org/vim90.php

Once you have installed Vim 9.0 you can find details about the changes
since Vim 9.0 with:
:help version9


Why Vim9 Script
---------------

A new script language, what is that needed for? Vim script has been
growing over time, while preserving backwards compatibility. That means
bad choices from the past often can't be changed and compatibility with
Vi restricts possible solutions. Execution is quite slow, each line is
parsed every time it is executed.

The main goal of Vim9 script is to drastically improve performance. This
is accomplished by compiling commands into instructions that can be
efficiently executed. An increase in execution speed of 10 to 100 times
can be expected.

A secondary goal is to avoid Vim-specific constructs and get closer to
commonly used programming languages, such as JavaScript, TypeScript and
Java.

The performance improvements can only be achieved by not being 100%
backwards compatible. For example, making function arguments available
by creating an "a:" dictionary involves quite a lot of overhead. In a
Vim9 function this dictionary is not available. Other differences are
more subtle, such as how errors are handled.

For those with a large collection of legacy scripts: Not to worry! They
will keep working as before. There are no plans to drop support for
legacy script. No drama like with the deprecation of Python 2.


Interesting Features
--------------------

To profit from the speedup a function must be defined with "def". The
argument and return types must be specified. This is not only to make
execution faster, it also helps uncovering mistakes early, when the
function is compiled into byte code. Variables are declared with "var"
and also have a type, either explicitly or inferred from the assigned
value.

Line continuation does not require using a backslash, the mechanism that
is used in legacy script, which is a bit weird and was required to keep
it backwards compatible.

Function calls do not require "call", assignments are done without "let"
and expressions are evaluated without "eval". This makes a Vim9 script
look a lot more like most programming languages.

Splitting up a large script in small pieces has been made a lot simpler.
In one script "export" is used to make specific functions and variables
available to other scripts. The rest is local to the script. Then
"import" is used where the exported items are to be used. Combined with
an autoload mechanism this makes a flexible and powerful way to
implement large plugins.

Comments now start with "#". The previous double quote syntax, which
comes from the good old Vi, interferes with how strings are used. The
use of "#" is known from many other languages, such as Python and shell
scripts.

Otherwise most things work the same way. Users who have written Vim
script will find it easy to switch over. Unexpected differences usually
lead to an error message with a hint how to do make the line work in
Vim9 script.

Details about Vim9 script and rationale for the choices can be found
with ":help vim9" in Vim or online: https://vimhelp.org/vim9.txt.html

Otherwise, many improvements were made not related to Vim9 script. You
can find a list with ":help new-9" in Vim or online:
https://vimhelp.org/version9.txt.html#new-9


Future Work
-----------

There will surely be a Vim 9.1 release. Nobody knows when.

Among the plans for Vim9 script is the addition of classes. Although a
dictionary can be used to simulate this, it is far from ideal. Most
programmers are familiar with classes such as Java has. Something like
that should be added to Vim9 script. The keywords are already reserved.


Dedication
----------

Vim version 9.0 is dedicated to Sven Guckes, who passed away in February
2022 when the release was being prepared. Sven was a long time
supporter of Vim. He registered the vim.org domain and created the
first Vim website. We will remember him!


Gratitude
---------

If you like Vim, please consider helping poor children in the south of
Uganda: http://iccf-holland.org


Where to get it
---------------

The best way to obtain the latest Vim is using Git. Summary:
git clone https://github.com/vim/vim.git
More information here: https://www.vim.org/git.php

For MS-Windows most of you will want to use the signed installer at:
https://github.com/vim/vim-win32-installer/releases

Or use the self-installing executable (uses older libraries):
https://ftp.nluug.nl/pub/vim/pc/gvim90.exe

Information about which files to download for what system:
https://www.vim.org/download.php

A list of mirror sites can be found here:
https://www.vim.org/mirrors.php


Files available for download (if you don't use GitHub or the installer):

UNIX:
sources + runtime files, bzip2 compressed:
https://ftp.nluug.nl/pub/vim/unix/vim-9.0.tar.bz2

VARIOUS:
help files converted to HTML:
https://ftp.nluug.nl/pub/vim/doc/vim90html.zip

MS-WINDOWS separate files:
Runtime files:
https://ftp.nluug.nl/pub/vim/pc/vim90rt.zip
GUI binary for Windows NT/2000/XP/7/8/10:
https://ftp.nluug.nl/pub/vim/pc/gvim90.zip
GUI binary with OLE support:
https://ftp.nluug.nl/pub/vim/pc/gvim90ole.zip
Console version for Windows NT/2000/XP/7/8/10:
https://ftp.nluug.nl/pub/vim/pc/vim90w32.zip
Sources for PC (with CR-LF):
https://ftp.nluug.nl/pub/vim/pc/vim90src.zip

For debugging:
https://ftp.nluug.nl/pub/vim/pc/gvim90.pdb
https://ftp.nluug.nl/pub/vim/pc/gvim90ole.pdb
https://ftp.nluug.nl/pub/vim/pc/vim90w32.pdb

AMIGA:
Only runtime and sources are provided, no binary:
https://ftp.nluug.nl/pub/vim/amiga/vim90rt.tgz
https://ftp.nluug.nl/pub/vim/amiga/vim90src.tgz


Omitted in this version are:
- The 16-bit DOS, OS/2 and Amiga versions, these are obsolete.
- The 32-bit console version for MS-DOS/Windows 95/98


Mailing lists et al.
--------------------

A good place to get help from others is Stackexchange:
https://vi.stackexchange.com/

For user questions you can turn to the Vim mailing list. There are a
lot of tips, scripts and solutions. You can ask your Vim questions, but
only if you subscribe. See https://www.vim.org/maillist.php#vim

If you want to help Vim development, discuss new features or get the
latest patches, subscribe to the vim-dev mailing list. See
https://www.vim.org/maillist.php#vim-dev

Subject specific lists:
Macintosh issues: https://www.vim.org/maillist.php#vim-mac

Before you ask a question you should search the archives, someone may
already have given the answer.


Reporting bugs
--------------

Create an issue at GitHub or, if you know the solution, create a pull
request: https://github.com/vim/vim

Alternatively send your problem to <vim...@vim.org>.

All the time spent on answering mail and digging into problems is
subtracted from the time that is spent on improving Vim! Always give a
reproducible example and try to find out which settings or other things
influence the appearance of the bug. Start Vim without your plugins:
"vim --clean". Try different machines if possible. See ":help bugs" in
Vim. Ideally write a test that reproduces the problem and will pass
once it is fixed.


Happy Vimming!


--
Anyone who is capable of getting themselves made President should on no
account be allowed to do the job.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Bhaskar Chowdhury

unread,
Jun 28, 2022, 7:07:07 PM6/28/22
to vim...@googlegroups.com, vim-an...@vim.org, vim...@vim.org, v...@vim.org, vim...@vim.org
On 15:55 Tue 28 Jun 2022, Bram Moolenaar wrote:
>
>
>Hello Vim users!
>
>Announcing: Vim (Vi IMproved) version 9.0
>
>
Thanks, man! Much appreciated. :)
>--
>--
>You received this message from the "vim_use" maillist.
>Do not top-post! Type your reply below the text you are replying to.
>For more information, visit http://www.vim.org/maillist.php
>
>---
>You received this message because you are subscribed to the Google Groups "vim_use" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20220628145517.515BB1C055A%40moolenaar.net.

--
Thanks,
Bhaskar

"Here's looking at you kid"-- Casablanca
signature.asc

Shlomi Fish

unread,
Jun 28, 2022, 11:50:58 PM6/28/22
to vim...@googlegroups.com
Hi Bram [and all],

On Tue, 28 Jun 2022 15:55:17 +0100
Bram Moolenaar <Br...@moolenaar.net> wrote:

> Hello Vim users!
>
> Announcing: Vim (Vi IMproved) version 9.0
>
>
> This is a major release. The main new feature is the addition of Vim9
> script. Besides that a lot of bugs have been fixed, documentation was
> updated, test coverage was improved, etc.
>
> Read the announcement online: https://www.vim.org/vim90.php
>
> Once you have installed Vim 9.0 you can find details about the changes
> since Vim 9.0 with:
> :help version9
>

thanks, congrats and - good luck:

* https://www.youtube.com/watch?v=t6Lo_aMW7zk

* https://www.youtube.com/watch?v=6zDwWzk11oM

* https://www.youtube.com/watch?v=tG-wl2qqD7Y

with ♥,

-- Shlomi

>
> Why Vim9 Script
> ---------------
>
> A new script language, what is that needed for? Vim script has been
> growing over time, while preserving backwards compatibility. That means
> bad choices from the past often can't be changed and compatibility with
> Vi restricts possible solutions. Execution is quite slow, each line is
> parsed every time it is executed.
>
> The main goal of Vim9 script is to drastically improve performance. This
> is accomplished by compiling commands into instructions that can be
> efficiently executed. An increase in execution speed of 10 to 100 times
> can be expected.
>
> A secondary goal is to avoid Vim-specific constructs and get closer to
> commonly used programming languages, such as JavaScript, TypeScript and
> Java.
>
> The performance improvements can only be achieved by not being 100%
> backwards compatible. For example, making function arguments available
> by creating an "a:" dictionary involves quite a lot of overhead. In a
> Vim9 function this dictionary is not available. Other differences are
> more subtle, such as how errors are handled.
>
> For those with a large collection of legacy scripts: Not to worry! They
> will keep working as before. There are no plans to drop support for
> legacy script. No drama like with the deprecation of Python 2.
>



--

Shlomi Fish https://www.shlomifish.org/
https://youtu.be/xZLwtc9x4yA - Anime in Real Life!! (Parody)

Between truth and the search for truth, I opt for the second.
— Bernard Berenson (Unsourced via fortune-mod)

Please reply to list if it's a mailing list post - https://shlom.in/reply .

Salman Halim

unread,
Jun 28, 2022, 11:53:43 PM6/28/22
to Vim Users
Great news! Fantastic achievement. I'm enjoying writing scripts in Vim 9 and look forward to classes coming in, also. 

Much respect to all involved in the effort. 

Salman

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.

Rand Pritelrohm

unread,
Jun 29, 2022, 2:44:58 AM6/29/22
to Bram Moolenaar, vim...@googlegroups.com, vim-an...@vim.org, vim...@vim.org, v...@vim.org
On Tue, 28 Jun 2022 15:55:17 +0100
Bram Moolenaar <Br...@moolenaar.net> wrote:

>Hello Vim users!
>
>Announcing: Vim (Vi IMproved) version 9.0
>
>
>This is a major release. The main new feature is the addition of Vim9
>script. Besides that a lot of bugs have been fixed, documentation was
>updated, test coverage was improved, etc.
>

[...]

>
>
>Happy Vimming!
>
>

Hello Bram,

Fantastic!

With respect and my warmest thanks.

--
Rand Pritelrohm

Steve Litt

unread,
Jun 29, 2022, 7:58:51 PM6/29/22
to vim...@googlegroups.com
Bram Moolenaar said on Tue, 28 Jun 2022 15:55:17 +0100

>Hello Vim users!
>
>Announcing: Vim (Vi IMproved) version 9.0
>
>
>This is a major release. The main new feature is the addition of Vim9
>script. Besides that a lot of bugs have been fixed, documentation was
>updated, test coverage was improved, etc.
>
>Read the announcement online: https://www.vim.org/vim90.php
>
>Once you have installed Vim 9.0 you can find details about the changes
>since Vim 9.0 with:
> :help version9

Very nice! Thank you. Also, thanks for the Vim I've used every day
for the past 20 years.


SteveT

Steve Litt
Summer 2022 featured book: Making Mental Models: Advanced Edition
http://www.troubleshooters.com/mmm

Roy Fulbright

unread,
Jun 29, 2022, 8:15:38 PM6/29/22
to vim_use
Thank you Bram, and to all those who had a part in bringing Vim 9 to life. I cannot count the number of hours Vim has saved me. I've always been of the opinion to let the computer do as much for me as possible, and Vim surely fills that bill. People are still awe-struck when I show them what Vim can do.

Keith Christian

unread,
Jun 29, 2022, 8:25:44 PM6/29/22
to vim...@googlegroups.com
Bram,

Thanks for your continuous Improvement of one of the most important pieces of Open Source software in existence!
Reply all
Reply to author
Forward
0 new messages