Re: Vim9 script: first steps

2020-01-05 Fir de Conversatie Bram Moolenaar
Ben Jackson wrote: > >> Hi Bram, thanks for sharing. Looks really promising. > >> > >> Regarding https://github.com/brammool/vim9#3-better-vim-script, I have a > >> few ideas for your consideration: > >> > >> * Execution often relies on user configuration (ignorecase, magic, etc.) > >> and t

Re: Vim9 script: first steps

2020-01-05 Fir de Conversatie Ben Jackson
> On 5 Jan 2020, at 18:55, Bram Moolenaar wrote: > > > Ben Jackson wrote: > >> Hi Bram, thanks for sharing. Looks really promising. >> >> Regarding https://github.com/brammool/vim9#3-better-vim-script, I have a >> few ideas for your consideration: >> >> * Execution often relies on user co

Re: Vim9 script: first steps

2020-01-05 Fir de Conversatie Prabir Shrestha
> > > * provide a interface to a debug adapter to allow debugging of vimscript > > executing in a Vim instance (i.e. Vim Debug Adapter) > Sure. +1 for this. This is always the first function I write in a plugin. It would be good to either support chrome devtools debugg protocol or language serv

Re: Vim9 script: first steps

2020-01-05 Fir de Conversatie Bram Moolenaar
Christian wrote: > On So, 05 Jan 2020, Bram Moolenaar wrote: > > > Perhaps tree sitter can be used. It's still new, makes some promises, > > but we would need to see how it can integrate with Vim. > > We could have a look at the Neovim implementation. It has been included > there as well (an

Re: Vim9 script: first steps

2020-01-05 Fir de Conversatie Bram Moolenaar
Ben Jackson wrote: > Hi Bram, thanks for sharing. Looks really promising. > > Regarding https://github.com/brammool/vim9#3-better-vim-script, I have a > few ideas for your consideration: > > * Execution often relies on user configuration (ignorecase, magic, etc.) > and there is common boiler

Re: Vim9 script: first steps

2020-01-05 Fir de Conversatie Christian Brabandt
On So, 05 Jan 2020, Bram Moolenaar wrote: > Perhaps tree sitter can be used. It's still new, makes some promises, > but we would need to see how it can integrate with Vim. We could have a look at the Neovim implementation. It has been included there as well (and as far as I remember, @bfredl

Re: Vim9 script: first steps

2020-01-05 Fir de Conversatie Ben Jackson
Hi Bram, thanks for sharing. Looks really promising. Regarding https://github.com/brammool/vim9#3-better-vim-script, I have a few ideas for your consideration: * Execution often relies on user configuration (ignorecase, magic, etc.) and there is common boilerplate required in many scripts to se

Re: Vim9 script: first steps

2020-01-05 Fir de Conversatie Bram Moolenaar
Prabir Shrestha wrote: > -1 for }. That is the most absurd syntax I have seen in any language that > only uses it for closing. OK, it appears nobody likes it. The whole idea of experimenting is to try out alternatives. > So I went and re-read the poll https://github.com/vim/vim/issues/3573.

Re: Vim9 script: first steps

2020-01-05 Fir de Conversatie Bram Moolenaar
Ingo Karkat wrote: > I agree; most performance issues I encounter are in syntax > highlighting with large, often deeply nested structures (like big XML > or JSON files). Poor Vimscript performance hardly is an issue for the > kind of plugins that I write; and it's always been possible to use a >

Re: Vim9 script: first steps

2020-01-05 Fir de Conversatie Ingo Karkat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 05-Jan-2020 01:22 +0100, Prabir Shrestha wrote: > -1 for }. That is the most absurd syntax I have seen in any > language that only uses it for closing. > > So I went and re-read the poll > https://github.com/vim/vim/issues/3573. And here is what

Re: Vim9 script: first steps

2020-01-04 Fir de Conversatie Prabir Shrestha
My goal is not to remove VimScript. It should remain there. But instead of adding if_my_favorite_langauge. We should add if_wasm and call stop adding any other languages. "Web" in WASM is misleading, it has nothing to do with "Web" as in internet or browser similar to Java in Javacsript has not

Re: Vim9 script: first steps

2020-01-04 Fir de Conversatie mattn
Simply poor readability for me. And it will be difficult to support Vim script syntax highlighting in other text editors or viewer (like GitHub). On Saturday, January 4, 2020 at 10:05:53 PM UTC+9, Andy Massimino wrote: > > On 1/3/20 8:17 AM, Bram Moolenaar wrote: > > Ken Takata wrote: > > > >

Re: Vim9 script: first steps

2020-01-04 Fir de Conversatie Andy Massimino
On 1/3/20 8:17 AM, Bram Moolenaar wrote: Ken Takata wrote: 2020/1/3 Fri 19:02:13 UTC+9 Bram Moolenaar wrote: Yasuhiro Matsumoto wrote: Why you don't use { ? I know this will trigger a discussion. Nearly all languages use blocks ending with "}". It's much easier to see where a block ends

Re: Vim9 script: first steps

2020-01-04 Fir de Conversatie Dominique Pellé
mattn wrote: > If you are thinking vim9 accept to use lambda in the expression in while/for, > it will be confusable. > > while {ー>1}() > ... > } That's confusing indeed. I'd rather keep { … } for blocks. Now that's a matter of personal preference, but I find the asymmetry of having a closin

Re: Vim9 script: first steps

2020-01-03 Fir de Conversatie mattn
If you are thinking vim9 accept to use lambda in the expression in while/for, it will be confusable. while {ー>1}() ... } -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim

Re: Vim9 script: first steps

2020-01-03 Fir de Conversatie Bram Moolenaar
Ken Takata wrote: > 2020/1/3 Fri 19:02:13 UTC+9 Bram Moolenaar wrote: > > > > > > Yasuhiro Matsumoto wrote: > > > > > Why you don't use { ? > > > > I know this will trigger a discussion. Nearly all languages use blocks > > ending with "}". It's much easier to see where a block ends that way

Re: Vim9 script: first steps

2020-01-03 Fir de Conversatie Ken Takata
Hi Bram, 2020/1/3 Fri 19:02:13 UTC+9 Bram Moolenaar wrote: > > > Yasuhiro Matsumoto wrote: > > > Why you don't use { ? > > I know this will trigger a discussion. Nearly all languages use blocks > ending with "}". It's much easier to see where a block ends that way > than using "endif", "endw

Re: Vim9 script: first steps

2020-01-03 Fir de Conversatie Bram Moolenaar
Yasuhiro Matsumoto wrote: > Why you don't use { ? I know this will trigger a discussion. Nearly all languages use blocks ending with "}". It's much easier to see where a block ends that way than using "endif", "endwhile", etc., it stands out. Since we already have the start of the block with

Re: Vim9 script: first steps

2020-01-03 Fir de Conversatie Bram Moolenaar
Prabir Shrestha wrote: > It is great to see the numbers. @Bram What about something like this so it > is 100% backwards compatible. The best part is that it works in current > vim8 without any errors. > > function! s:greet(name) abort > "use strict" > echom a:name > endfunction > > call

Re: Vim9 script: first steps

2020-01-02 Fir de Conversatie Prabir Shrestha
It is great to see the numbers. @Bram What about something like this so it is 100% backwards compatible. The best part is that it works in current vim8 without any errors. function! s:greet(name) abort "use strict" echom a:name endfunction call s:greet('Vim9') Javascript does this too. ht

Vim9 script: first steps

2020-01-02 Fir de Conversatie mattn
Why you don't use { ? -- -- You received this message from the "vim_dev" 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 "vi

Vim9 script: first steps

2020-01-02 Fir de Conversatie Bram Moolenaar
I have created a repository for the Vim9 script experiments: https://github.com/brammool/vim9 I did another measurement for a more realistic example, re-indenting a large number of lines. In old Vim script it would be: let totallen = 0 for i in range(1, 10) call setline(i, '' .