Related: I found out about a vim/neovim plugin called Molten[1] that tries to be a replacement for Jupyter Notebooks in the terminal. It was a little rough around the edges ~5 months ago when I tried it, but looking at the repo it seems its still being actively developed, so maybe that's changed. IIRC it uses an ipynb server to keep track of each cell's outputs. I quite enjoyed using it as someone who doesn't need notebooks very often and loathes leaving my terminal setup.<p>[1] <a href="https://github.com/benlubas/molten-nvim">https://github.com/benlubas/molten-nvim</a>
How can you execute the current buffer line as a vim command? I have this shortcut on one of my machines, but it's really tough to search the Internet for.<p>It's so useful for one-off report generation, I use it daily on my (last remaining) Windoze machine.<p>Vomscript isn't that bad! Not any worse than Bash, haha. It turns out that you can get plenty done with only arrays and without a native Map data structure. If you get desperate, use SQLite. <i>*Grin*</i>
I like the feature that allows you to put a block's output into another block. I've been toying with the idea of self-modifying/self-introspecting documents for some time, and I think they're a good concept for ad-hoc files in the space between prose, scripts, and databases.
What I really want is a Notebook experience for the terminal, but output is for each command is automatically stored in separate buffers.<p>Then I can tweak commands, or chain the input from the buffers. (automatically using mkfifo or something)<p>I want my command to history stored in another buffer, and another buffer that I can quickly move the commands and/or output to a script or a markdown document for documentation.<p>That way I can quickly debug or build scripts, or perform analysis, and it will automatically have an executable to reproduce all my steps.
I created something similar in emacs for markdown [1,2]. The real feature needed is to connect to ipython, so images etc can be embedded into the markdown file as a image link. Don't know how to do this.<p>[1] <a href="https://gist.github.com/abdullahkhalids/83055b1abbd2cdf2416a480d046136e1" rel="nofollow">https://gist.github.com/abdullahkhalids/83055b1abbd2cdf2416a...</a><p>[2] Yes, I know about org-mode and I do use it.
Mdsh also works great in CI-like context[1], but I don't think it can eval per block. Definitely trying out medieval for those odd "I want to run this one thing from a README but I don't wanna leave vim" cases.<p>[1]: <a href="https://github.com/zimbatm/mdsh">https://github.com/zimbatm/mdsh</a>
I’m going to link to my own comment here: <a href="https://news.ycombinator.com/item?id=41945124">https://news.ycombinator.com/item?id=41945124</a><p>This is super easy in kakoune, requires few keystrokes and no customization, and can be done in any kind of buffer.
looks like a nice tool for evaluating code blocks directly in Vim's Markdown buffers, and the ability to redirect outputs into named blocks is a cool way to keep everything contained in the editor. If you're looking for something similar but more versatile across different environments, check out *Cog*. It embeds executable code in any text file and inserts the output back into the document, which is great for automating documentation outside of Vim, especially in CI pipelines.