Saturday, March 30, 2019

Re: Announce: ECMAScript interface for Vim

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)

No comments: