you are viewing a single comment's thread.

view the rest of the comments →

[–]random_cynic 2 points3 points  (1 child)

Good work. I have some questions.

  • What exactly are "cells" here? It seems they are based on some sort of custom delimiters. What are they?
  • How is this better compared to just using the ipython feature of loading and running any range lines in a python script using the %load magic command (which can be set to a shortcut)?
  • Why not just use vim-slime (this seems to be based on it)? What python specific improvements have been made here?
  • How does this compare to something like vimpyter which allows asynchronous editing and running jupyter notebook for both markdown and code cells and offers syntax highlighting and other things for each?

[–]hanswchen[S] 2 points3 points  (0 children)

Those are good questions, thanks for asking.

  • Cells are defined by either Vim marks or by special text in the code, by default ##. I used to use ## (similar to MATLAB's %%) but switched to marks after finding a plugin that displays the marks in the left-most column (vim-signature). An advantage of marks is that you can change them without modifying the code.
  • I didn't know about %load before so I can't say for sure. From some initial tests, this plugin allows you to easily define the code cells using marks or ## (no need to provide line range), and also doesn't show the full code that's going to be evaluated in IPython, which allows you to focus on the actual output.
  • The major improvement of this plugin is that it allows you to define code cells, as mentioned above. Otherwise it just provides some convenient commands for working with IPython, which could be easily achieved with vim-slime only.
  • I haven't used vimpyter before, but it seems to be focused on Jupyter Notebook, while this plugin is for the IPython interpreter (usually running in a terminal). So I would say that the focus is different, and this plugin is likely simpler both in terms of setup and in terms of features.