> NeoVim is free to follow. It appears NeoVim's ideas about jobs and > channels are quite different. And it seems to be quite complicated.
Bram I'd love to see Neovim and Vim have the same API for shared features, in fact I have read the documentation about Vim's new channel feature and saw it can very easily be implemented on top Neovim existing async infrastructure(Basically we have a single async core that is used for implementing all async features, so adding new sources of asynchronous events is very easy at this point). I will be glad to add a compatibility layer to Vim's channel feature if plugin authors start to use it, but unfortunately I can't do the same for this job control API as it will only make things harder for users. When using a shell like bash or zsh, one can send programs to background to work on something else, and its fine that background jobs reuse the terminal stdout/stdin for communication since the consumer is sitting in the front of the terminal. But in the context of an editor like Vim, the main use case for background jobs is to allow implementation of asynchronous plugins that parse/send data to the process(like the coprocess feature in bash/zsh), so it would make more sense to simply have `job_start` receive callbacks that are invoked when the process sends data, and add a function to send data to the job's object(IMO this is simpler than going through the additional step of setting up a channel) Take the neomake plugin for example(https://github.com/benekastah/neomake), it currently parses compilation data from programs directly, but with this new API it would probably have to write a wrapper program in some scripting language to read the job's redirected data and communicate with Vim through sockets. IMHO you should consider decoupling job control from the channel feature, or it will make things more complicated for plugin authors since they will need to setup an additional layer for socket communication with the job(correct me if I'm wrong, but from what I could understand, the channel feature only works through sockets and not from the job's stdio). I'm sure plugin authors and the community that already use Neovim's job control would be very happy if you followed our API, especially since we implemented it first(Am I wrong to say that Neovim was the main driving force behind you implementing job control and the channel feature?) I know that at the moment it is impossible for Vim to use Neovim implementation since it diverged a lot by using libuv, but maybe you could base this feature on the patch I sent two years ago?( https://groups.google.com/forum/#!topic/vim_dev/QF7Bzh1YABU). The patch is old and API is different from what Neovim currently exposes, but if your are open to the idea I will be glad to assist in updating the patch to the current API and Vim's codebase. It would be much better for the community if we helped each other. During this time developing Neovim I have faced many challenges in implementing asynchronous features, I'd be happy to share my experiences to make things easier for you. Neovim could also benefit a lot from your vast knowledge of the code. BTW have you ever considered using Neovim as a "test bench" for new Vim features? We would be happy to receive PRs from you every once in a while. -- -- 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 "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
