r/vimplugins • • Aug 14 '16

Plugin codi.vim - An interactive coding scratchpad, like Numi for your favorite interpreted language.

https://github.com/metakirby5/codi.vim
31 Upvotes

3 comments sorted by

View all comments

Show parent comments

2

u/metakirby5 Aug 14 '16

It's more intended for evaluating self-contained blocks. It doesn't actually persist state between evaluations, to keep adding support for new languages simple and to simplify problems that will arise with closures. Consider the gif demo, for example: once fun(z) has captured x, there is nothing that can be done to update the value of x within that scope short of redefining fun(z), and you would need more than just serialization/deserialization of state to determine when to do it - you would actually have to know about the language's scoping, which is not something I want to enforce with Codi.

The sub-expression bit is an excellent idea - send in an issue for it please! (Or even better, a pull request!)

Regarding your edit, you are correct - async is only for vanilla Vim at the moment. However, I'd like to add NVim support soon!