Vim9 - Python/Lua interface

48 views
Skip to first unread message

rameo

unread,
May 13, 2020, 6:54:19 AM5/13/20
to vim_use
I first came into contact with Vim about 15 years ago.
A few times I uninstalled it and reinstalled it a while later. After a few months I was convinced it was the best text editor I had ever seen.
I only noticed how much value it had when I wrote scripts in vimrc myself and changed plugins/menu.
Still, I had to get used to Vimscript. A whole new language, not something similar I already knew.
However, I got completely excited when I understood that I could write scripts in Lua and Python.
Why? Because it was not easy to get used to Vimscript and the help I asked on internet sites was rarely answered.
Anyway, I did benefit from the vim_use group but I noticed that I found solutions faster writing in Python.
I knew the language better and there was a huge amount of information online.

Now I recently read on Reddit that there would be some changes in Vim9 and not everyone thought it was a good idea.
Vimscript is going to change in Vim9 to make Vim respond faster. That's a good idea, although Vim is fast enough for me. The fastest editor I've ever seen.
Reading further I read that Vim9 will be without its Python/Lua interface.
That is really a pity.
Instead of removing the Python and Lua interface, why not integrate them even more?
It would be great if we could search in Vim with python regex.
Even if we could program the user input in python code.
People often already know Python and Lua. I think it will bring a much larger amount of users to Vim.

Is it true that the Python and Lua interface will disappear?

Bram Moolenaar

unread,
May 13, 2020, 2:05:28 PM5/13/20
to vim...@googlegroups.com, rameo

> I first came into contact with Vim about 15 years ago.
> A few times I uninstalled it and reinstalled it a while later. After a few
> months I was convinced it was the best text editor I had ever seen.
> I only noticed how much value it had when I wrote scripts in vimrc myself
> and changed plugins/menu.
> Still, I had to get used to Vimscript. A whole new language, not something
> similar I already knew.
> However, I got completely excited when I understood that I could write
> scripts in Lua and Python.
> Why? Because it was not easy to get used to Vimscript and the help I asked
> on internet sites was rarely answered.
> Anyway, I did benefit from the vim_use group but I noticed that I found
> solutions faster writing in Python.
> I knew the language better and there was a huge amount of information
> online.
>
> Now I recently read on Reddit that there would be some changes in Vim9 and
> not everyone thought it was a good idea.
> Vimscript is going to change in Vim9 to make Vim respond faster. That's a
> good idea, although Vim is fast enough for me. The fastest editor I've ever
> seen.
> Reading further I read that Vim9 will be without its Python/Lua interface.
> That is really a pity.

Not sure what gave you that idea. We don't plan to do much work on
these interfaces, but they are certainly not going away. I suggested to
remove the least used one, Scheme, and immediately got objection from a
few people. Python is widely used, and some people like Lua. Might
also help for people who come from Neovim, which did some more Lua
stuff. Otherwise Lua isn't widely used and it doesn't appear to grow:
https://trends.google.com/trends/explore?date=today%205-y&geo=IT&q=%2Fm%2F0chpd,%2Fm%2F0n50hxv,%2Fm%2F05z1_

> Instead of removing the Python and Lua interface, why not integrate them
> even more?
> It would be great if we could search in Vim with python regex.
> Even if we could program the user input in python code.
> People often already know Python and Lua. I think it will bring a much
> larger amount of users to Vim.

This has existed as an idea for a long time, but nothing much has
happened. Clearly there are more plugin writers using Vim script than
anything else.

> Is it true that the Python and Lua interface will disappear?

No.

--
I AM THANKFUL...
...for all the complaining I hear about the government
because it means we have freedom of speech.

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

rameo

unread,
May 13, 2020, 3:13:01 PM5/13/20
to vim_use
Thank you for your comment.
That is good news.
Glad to hear.

I read about the new features in vim9 here:
https://www.reddit.com/r/vim/comments/ey91bd/i_have_mixed_feelings_for_vim9_script_what_do_you/

and here:
https://github.com/brammool/vim9
(2. Phasing out Interfaces)

Would be great to use python regex in the command line.
Hopefully it'll work out. I'm also thinking of a way to leave python functions just like in vimscript (return).

Andrey Butirsky

unread,
May 13, 2020, 4:40:14 PM5/13/20
to vim...@googlegroups.com
On 5/13/20 21:05, Bram Moolenaar wrote:
> Clearly there are more plugin writers using Vim script than
> anything else.
Maybe it's chicken and the egg problem? :)
Reply all
Reply to author
Forward
0 new messages