Saturday, March 30, 2019

Re: Announce: ECMAScript interface for Vim

On Sat, Mar 30, 2019 at 10:55 PM Andrey Butirsky <butirsky@gmail.com> wrote:
>
> On 3/30/19 9:54 PM, Bob Pepin wrote:
>
> On 28 Mar 2019, at 15.01, Andrey <butirsky@gmail.com> wrote:
>
> Thumbs up for any common language support!
> I would love if those languages could be used as much effectively as Vimscript itself for Vim programming.
>
> I tried to make all Vim builtins also ES builtins so that simple scripts look almost the same in ES as in Vimscript. Have a look at https://github.com/bobpepin/vim/blob/duktape/runtime/indent/python.js, autogenerated from the corresponding .vim file, https://github.com/bobpepin/vim/blob/duktape/runtime/indent/python.vim.
>
> (Caveat: no datatypes requiring automatic memory management can be passed between Vimscript builtins and ES)
>
> I am playing around with the asyn/await features from recent ES versions together with Vim channels and events (keyboard input/autocmds) right now, imho it's significantly more effective than Vimscript as soon as callbacks get involved. For a sample JSP implementation, see https://github.com/bobpepin/vim/blob/duktape/src/jsp-jsonrpc.ts.
>
> Best,
> Bob
>
> Thanks Bob, sounds interesting.
>
> Actually, I'm new to Vimscript and just had to lean it while working on my re-make of StlShowFunc plugin.
>
> Just curious if the plugin could be easily re-writed on ECMAScript also, could you have a look maybe? :)
>
> (e.g., people complained that Python integration is not very elegant, dunno anything about that)

Isn't there a chicken-and-egg problem there somewhere? I mean, Vim
cannot understand ECMAScript except by means of the plugin, so if the
plugin itself were written in ECMAScript, Vim couldn't decipher it,
could it?

Best regards,
Tony.

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: