Tuesday, September 22, 2020

Re: Jupyter/Ipython notebook integration within vim.

>I've found some plugins for the integration between Jupyter/Ipython
>notebook and vim, say, the following:
>
>https://github.com/lambdalisue/jupyter-vim-binding
>https://github.com/jwkvam/jupyterlab-vim

I get the feeling those aren't actual integrations? They are just intended to modify the Jupyter keybindings. They have nothing to do with Vim per se, I think.

It *is* possible to enable Vim to act as a stateless "poor man's notebook". Grab text with a motion in the usual way, and then run something like this:

silent exec "r ! " . escape(@", "%!#\r\n")

Combined with opfuncs and omaps, you can set it up so that pressing Enter will execute the current line and place the output just below the current line, similar-ish to Jupyter.

But I suspect this isn't what you had in mind by "integration".

A

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200923010034.GA12440%40sleipnir.

No comments:

Post a Comment