Mercurial > vim
comparison README_VIM9.md @ 31885:cc751d944b7e
Update runtime files.
Commit: https://github.com/vim/vim/commit/be4e01637e71c8d5095c33b9861fd70b41476732
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Feb 2 13:59:48 2023 +0000
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 02 Feb 2023 15:15:06 +0100 |
parents | d4faa2c5211b |
children |
comparison
equal
deleted
inserted
replaced
31884:27f905bc04df | 31885:cc751d944b7e |
---|---|
1 ![Vim Logo](https://github.com/vim/vim/blob/master/runtime/vimlogo.gif) | 1 ![Vim Logo](https://github.com/vim/vim/blob/master/runtime/vimlogo.gif) |
2 | 2 |
3 # What is Vim9? | 3 # What is Vim9? |
4 | 4 |
5 This is an experimental side of [Vim](https://github.com/vim/vim). | 5 This is a new syntax for Vim script that was introduced with Vim 9.0. |
6 It explores ways of making Vim script faster and better. | 6 It intends making Vim script faster and better. |
7 | 7 |
8 WARNING: The Vim9 script features are still under development, anything can | |
9 break! | |
10 | 8 |
11 # Why Vim9? | 9 # Why Vim9? |
12 | 10 |
13 ## 1. FASTER VIM SCRIPT | 11 ## 1. FASTER VIM SCRIPT |
14 | 12 |
15 The third item on the poll results of 2018, after popup windows and text | 13 The third item on the poll results of 2018, after popup windows and text |
16 properties, is faster Vim script. So how do we do that? | 14 properties, both of which have been implemented, is faster Vim script. |
15 So how do we do that? | |
17 | 16 |
18 I have been throwing some ideas around, and soon came to the conclusion | 17 I have been throwing some ideas around, and soon came to the conclusion |
19 that the current way functions are called and executed, with | 18 that the current way functions are called and executed, with |
20 dictionaries for the arguments and local variables, is never going to be | 19 dictionaries for the arguments and local variables, is never going to be |
21 very fast. We're lucky if we can make it twice as fast. The overhead | 20 very fast. We're lucky if we can make it twice as fast. The overhead |
51 That looks very promising! It's just one example, but it shows how much | 50 That looks very promising! It's just one example, but it shows how much |
52 we can gain, and also that Vim script can be faster than builtin | 51 we can gain, and also that Vim script can be faster than builtin |
53 interfaces. | 52 interfaces. |
54 | 53 |
55 LuaJit is much faster at Lua-only instructions. In practice the script would | 54 LuaJit is much faster at Lua-only instructions. In practice the script would |
56 not do something useless as counting but change the text. For example, | 55 not do something useless counting, but change the text. For example, |
57 reindent all the lines: | 56 reindent all the lines: |
58 | 57 |
59 ``` vim | 58 ``` vim |
60 let totallen = 0 | 59 let totallen = 0 |
61 for i in range(1, 100000) | 60 for i in range(1, 100000) |