jupyter and vim

This page summarizes the projects mentioned and recommended in the original post on /r/vim

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • magma-nvim

    Interact with Jupyter from NeoVim.

  • I'm in a similar field and run into this issue before. If you're willing to dive into neovim, magma-nvim might be worth a shot? It supports displaying images inline, it's a very impressive plugin!

  • jupyter-vim

    Make Vim talk to Jupyter kernels

  • Now here comes the endboss: Jupyter. For the first time, I feel like I'm missing out on stuff when using vim. I've started a job in datascience, which is actually awesome. However, I work a lot with image data. I also do a lot of analysis on results, meaning I do a lot of fancy plots that hopefully show the weaknesses of our prediction models. I recently wrote an augmentation algorithm where I had to see the output in form of an image after every step to make sure it's correct. This is not a possible workflow in vim right now. I know of many solutions that I already tried, like for example jupyter-vim or the jupyter vim mode. I'd like to work inside my terminal though. I'm not this kind of purist who needs to have a terminal that is compatible with VT100 or whatever people came up with in the 80ies. I also don't care if my terminal in based on an ascii like grid or actually rendered in HTML. I just want (Neo)vim, with the functionality of jupyter (inline plotting) even if this means vim has to be rendered inside an electron app or whatever people use these days for fancy GUIs. Imagine an electron based editor like Oni which not only runs the "real" neovim in the background, but is also able to do inline figures, images, plots and even interactive stuff. It seems to me like I can't be the only one who wants this. So after all this, here's the question: Is there anything you now of that allows for this kind of stuff? Is there any other workflow that I'm not aware of? Or do people just not use those features when working with vim? Pls help a vimmer stay at vim.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • oni

    Discontinued Oni: Modern Modal Editing - powered by Neovim

  • Now here comes the endboss: Jupyter. For the first time, I feel like I'm missing out on stuff when using vim. I've started a job in datascience, which is actually awesome. However, I work a lot with image data. I also do a lot of analysis on results, meaning I do a lot of fancy plots that hopefully show the weaknesses of our prediction models. I recently wrote an augmentation algorithm where I had to see the output in form of an image after every step to make sure it's correct. This is not a possible workflow in vim right now. I know of many solutions that I already tried, like for example jupyter-vim or the jupyter vim mode. I'd like to work inside my terminal though. I'm not this kind of purist who needs to have a terminal that is compatible with VT100 or whatever people came up with in the 80ies. I also don't care if my terminal in based on an ascii like grid or actually rendered in HTML. I just want (Neo)vim, with the functionality of jupyter (inline plotting) even if this means vim has to be rendered inside an electron app or whatever people use these days for fancy GUIs. Imagine an electron based editor like Oni which not only runs the "real" neovim in the background, but is also able to do inline figures, images, plots and even interactive stuff. It seems to me like I can't be the only one who wants this. So after all this, here's the question: Is there anything you now of that allows for this kind of stuff? Is there any other workflow that I'm not aware of? Or do people just not use those features when working with vim? Pls help a vimmer stay at vim.

  • jupyter_ascending

    Ascend your Jupyter Notebook usage

  • jupyter_ascending looks promising as a vim-only solution. There is also magma-nvim for neovim users.

  • tup

    Tup is a file-based build system.

  • With more complex notebooks I often find the notebook gets too error-prone to work with. It's very easy to have some variable floating around from an old execution which you're accidentally relying on, for example. In these cases I've ported the notebook over to the Tup build system (http://gittup.org/tup/). Each cell becomes one Python file and effectively you get a system where modifying one cell will automatically rebuild all dependent cells. Anyway the relevance here is it's easy to output images to disk during this process, and eog will again auto-refresh these as you modify files.

  • jupytext.vim

    Vim plugin for editing Jupyter ipynb files via jupytext

  • Editing *.ipynb files can also be edited with jupytext.vim, which automatically converts *.ipynb files using jupytext which you open them in Vim. I haven't tried this yet (it's on my todo list), but it looks pretty solid.

  • feedgnuplot

    Tool to plot realtime and stored data from the commandline, using gnuplot.

  • I found using shell as an interactive environment to be pretty productive using https://github.com/dkogan/feedgnuplot and https://github.com/dkogan/vnlog. The filesystem becomes your state (instead of in memory state of your Python interpreter) which forces you to write Unix-style tools. Plotting with feedgnuplot spins up an interactive Qt plotter which I often used to explore 3D plots. It's not "inline" and fancy and does take a bit of grokking but I eventually found it more productive than Jupyter, especially as my development moved away from Python.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • vnlog

    Process labelled tabular ASCII data using normal UNIX tools

  • I found using shell as an interactive environment to be pretty productive using https://github.com/dkogan/feedgnuplot and https://github.com/dkogan/vnlog. The filesystem becomes your state (instead of in memory state of your Python interpreter) which forces you to write Unix-style tools. Plotting with feedgnuplot spins up an interactive Qt plotter which I often used to explore 3D plots. It's not "inline" and fancy and does take a bit of grokking but I eventually found it more productive than Jupyter, especially as my development moved away from Python.

  • vim-ipython-cell

    Seamlessly run Python code in IPython from Vim

  • I personally have vim (or neovim) and IPython open in two panes in tmux and then use my plugin vim-ipython-cell to run the code. It supports running code cells similar to what you have in Jupyter notebooks, so you can for example have one cell that reads the data and another cell to make the plot, and then just re-run the plotting part.

  • vim-ipython

    A two-way integration between Vim and IPython 0.11+

  • In my setup the figures appear as new windows on my other monitor, which works really well. If you want to display the figures inline, you can for example use QtConsole. You would then need another plugin to connect vim and IPython, for example vim-ipython (no support for cells as far as I know) or nvim-ipy (for neovim). Here's an article that describes a setup with the latter: https://www.blog.gambitaccepted.com/2020/04/26/neovim-qtconsole-setup/

  • nvim-ipy

    IPython/Jupyter plugin for Neovim

  • In my setup the figures appear as new windows on my other monitor, which works really well. If you want to display the figures inline, you can for example use QtConsole. You would then need another plugin to connect vim and IPython, for example vim-ipython (no support for cells as far as I know) or nvim-ipy (for neovim). Here's an article that describes a setup with the latter: https://www.blog.gambitaccepted.com/2020/04/26/neovim-qtconsole-setup/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts